<<< Date Index >>>     <<< Thread Index >>>

Re: What should go into 1.5.7?



On Thu, Jan 27, 2005 at 11:42:52AM +0100, Christoph Berg wrote:
> Re: Derek Martin in <20050127040702.GE11114@xxxxxxxxxx>
> > I'd like to re-submit pgp-auto-decode:
> > 
> >   http://www.pizzashack.org/mutt/patch-1.5.6.ddm.pgp-auto-decode.1
> 
> I'd like second it.

Thanks. :)

> The patch was broken for some time, so I didn't use it myself. It
> currently fails in mutt.h and mutt_crypt.h:

Ah, right.  I posted a fixed version to the list a while back, but I
never put it on my site (maily because I don't know how to name it).

I'll attach it to this message.  I can't promise that recent CVS
changes haven't broken it again though; I haven't downloaded recent
code since about May of last year.  

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

diff -u mutt/commands.c mutt.ddm/commands.c
--- mutt/commands.c     2004-04-13 05:33:33.000000000 +0900
+++ mutt.ddm/commands.c 2004-05-05 15:15:45.000000000 +0900
@@ -953,6 +953,7 @@
     rv = 1;
   }
   
+  h->security |= PGP_TRADITIONAL_CHECKED;
   mx_close_message (&msg);
   return rv;
 }
diff -u mutt/curs_main.c mutt.ddm/curs_main.c
--- mutt/curs_main.c    2004-04-13 05:33:33.000000000 +0900
+++ mutt.ddm/curs_main.c        2004-05-05 15:27:16.000000000 +0900
@@ -1114,7 +1114,7 @@
       case OP_DISPLAY_HEADERS: /* don't weed the headers */
 
        CHECK_MSGCOUNT;
-        CHECK_VISIBLE;
+       CHECK_VISIBLE;
        /*
         * toggle the weeding of headers so that a user can press the key
         * again while reading the message.
@@ -1132,6 +1132,8 @@
            menu->current = mutt_thread_next_unread (Context, CURHDR);
        }
  
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        if ((op = mutt_display_message (CURHDR)) == -1)
        {
          unset_option (OPTNEEDRESORT);
@@ -1808,6 +1810,8 @@
 CHECK_IMAP_ACL(IMAP_ACL_INSERT);
 #endif
 
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
         mutt_edit_message (Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
 
@@ -1818,6 +1822,8 @@
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
        CHECK_ATTACH;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1832,6 +1838,8 @@
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
        CHECK_ATTACH;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY|SENDGROUPREPLY, NULL, NULL, Context, tag ? 
NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1841,6 +1849,8 @@
        CHECK_ATTACH;
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY|SENDLISTREPLY, NULL, NULL, Context, tag ? 
NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1959,6 +1969,8 @@
        CHECK_ATTACH;
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
diff -u mutt/init.h mutt.ddm/init.h
--- mutt/init.h 2004-04-13 17:02:12.000000000 +0900
+++ mutt.ddm/init.h     2004-05-05 15:15:45.000000000 +0900
@@ -1480,6 +1480,17 @@
   ** \fBdeprecated\fP.
   ** (PGP only)
   */
+  { "pgp_auto_decode", DT_BOOL, R_NONE, OPTPGPAUTODEC, 0 },
+  /*
+  ** .pp
+  ** If set, mutt will automatically attempt to decrypt traditional PGP
+  ** messages whenever the user performs an operation which ordinarily would
+  ** result in the contents of the message being operated on.  For example,
+  ** if the user displays a pgp-traditional message which has not been manually
+  ** checked with the check-traditional-pgp function, mutt will automatically
+  ** check the message for traditional pgp.
+  */
+
 
   /* XXX Default values! */
   
diff -u mutt/mutt.h mutt.ddm/mutt.h
--- mutt/mutt.h 2004-04-13 17:02:12.000000000 +0900
+++ mutt.ddm/mutt.h     2004-05-05 15:16:13.000000000 +0900
@@ -445,6 +445,7 @@
   OPTPGPIGNORESUB,
   OPTPGPCHECKEXIT,
   OPTPGPLONGIDS,
+  OPTPGPAUTODEC,
 #if 0
   OPTPGPENCRYPTSELF,
 #endif

Attachment: pgp1c66IwCx5F.pgp
Description: PGP signature