On Mon, Apr 12, 2004 at 11:17:23PM +0200, Thomas Roessler wrote: > On 2004-02-04 03:51:34 -0500, Dale Woolridge wrote: > > > Around this time last year I posted a patch which incorporates > > inline (traditional) as an option in the pgp menu. As the patch > > has been in use by myself (and others) for nearly a year, as well > > as being part of the mutt-devel freebsd port for six months, I > > thought it might be time to repost the patch in the hopes it > > would be merged into the mutt distribution. Here again is the > > list of changes: > > Thanks for this excellent patch. I'm incorporating the attached > version of it. I've played around with this in cvs a bit, and it's quite nice indeed. I do have a few minor problems with $pgp_mime_ask: For the 'yes', 'ask-yes', and 'ask-no' values, the action is reasonable (automatically use pgp/mime for 'yes', ask for 'ask-yes' and 'ask-no'). However, the action for the 'no' value does nothing when the mail is sent and silently dumps the user back into the compose menu. I think an error message here would be useful to tell the user that the message cannot be sent, and why. Also, the name $pgp_mime_ask is not clear, especially for a quadoption. The answer to the question "should I ask about using PGP/MIME" cannot be "No, but ask" ;) How about $pgp_mime_auto ? Patch for these two items attached, plus a change to default $pgp_mime_auto to "ask-yes" rather than "no" as I suspect that is a more common case (inline doesn't work, the obvious next thing to do is to try PGP/MIME). David
? autom4te-2.53.cache
? content
? diff2
? diffs
? lib-patch
? stamp-h1
Index: crypt.c
===================================================================
RCS file: /home/roessler/cvs/mutt/crypt.c,v
retrieving revision 3.23
diff -u -r3.23 crypt.c
--- crypt.c 12 Apr 2004 21:19:27 -0000 3.23
+++ crypt.c 13 Apr 2004 04:00:14 -0000
@@ -185,8 +185,11 @@
}
/* otherwise inline won't work...ask for revert */
- if ((i = query_quadoption (OPT_PGPMIMEASK, _("Message can't be sent
inline. Revert to using PGP/MIME?"))) != M_YES)
- return -1;
+ if ((i = query_quadoption (OPT_PGPMIMEAUTO, _("Message can't be sent
inline. Revert to using PGP/MIME?"))) != M_YES)
+ {
+ mutt_error("Message can't be sent using inline PGP.");
+ return -1;
+ }
/* go ahead with PGP/MIME */
}
Index: init.h
===================================================================
RCS file: /home/roessler/cvs/mutt/init.h,v
retrieving revision 3.46
diff -u -r3.46 init.h
--- init.h 12 Apr 2004 21:19:27 -0000 3.46
+++ init.h 13 Apr 2004 04:00:18 -0000
@@ -1391,7 +1391,7 @@
** which consist of more than a single MIME part. Mutt can be
** configured to ask before sending PGP/MIME messages when inline
** (traditional) would not work.
- ** See also: ``$$pgp_mime_ask''.
+ ** See also: ``$$pgp_mime_auto''.
** .pp
** Also note that using the old-style PGP message format is \fBstrongly\fP
** \fBdeprecated\fP.
@@ -1413,7 +1413,7 @@
** which consist of more than a single MIME part. Mutt can be
** configured to ask before sending PGP/MIME messages when inline
** (traditional) would not work.
- ** See also: ``$$pgp_mime_ask''.
+ ** See also: ``$$pgp_mime_auto''.
** .pp
** Also note that using the old-style PGP message format is \fBstrongly\fP
** \fBdeprecated\fP.
@@ -1469,7 +1469,7 @@
** `reverse-'.
** (PGP only)
*/
- { "pgp_mime_ask", DT_QUAD, R_NONE, OPT_PGPMIMEASK, M_NO },
+ { "pgp_mime_auto", DT_QUAD, R_NONE, OPT_PGPMIMEAUTO, M_ASKYES },
/*
** .pp
** This option controls whether Mutt will prompt you for
Index: mutt.h
===================================================================
RCS file: /home/roessler/cvs/mutt/mutt.h,v
retrieving revision 3.26
diff -u -r3.26 mutt.h
--- mutt.h 12 Apr 2004 21:19:27 -0000 3.26
+++ mutt.h 13 Apr 2004 04:00:19 -0000
@@ -278,7 +278,7 @@
OPT_MIMEFWD,
OPT_MIMEFWDREST,
OPT_MOVE,
- OPT_PGPMIMEASK, /* ask to revert to PGP/MIME when inline fails */
+ OPT_PGPMIMEAUTO, /* ask to revert to PGP/MIME when inline fails */
#ifdef USE_POP
OPT_POPDELETE,
OPT_POPRECONNECT,
Attachment:
pgp19zP5RZT7G.pgp
Description: PGP signature