Re: (emacs) Parsing problems replying to encrypted html
authorDavid Bremner <david@tethera.net>
Fri, 1 Apr 2016 23:24:05 +0000 (20:24 +2100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:27 +0000 (16:21 -0700)
e3/a9f87bfec37584570f6665017a7d580a479aa5 [new file with mode: 0644]

diff --git a/e3/a9f87bfec37584570f6665017a7d580a479aa5 b/e3/a9f87bfec37584570f6665017a7d580a479aa5
new file mode 100644 (file)
index 0000000..aa1b8ce
--- /dev/null
@@ -0,0 +1,108 @@
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 18C696DE0243\r
+ for <notmuch@notmuchmail.org>; Fri,  1 Apr 2016 16:24:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.021\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.021 tagged_above=-999 required=5\r
+ tests=[AWL=-0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id JTW_-e-SBOo2 for <notmuch@notmuchmail.org>;\r
+ Fri,  1 Apr 2016 16:24:11 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 3EB1D6DE00DF\r
+ for <notmuch@notmuchmail.org>; Fri,  1 Apr 2016 16:24:11 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1am8Qj-0000qu-8T; Fri, 01 Apr 2016 19:24:41 -0400\r
+Received: (nullmailer pid 27810 invoked by uid 1000);\r
+ Fri, 01 Apr 2016 23:24:05 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Matthew Lear <matt@bubblegen.co.uk>\r
+Cc: notmuch@notmuchmail.org, David Edmondson <dme@dme.org>,\r
+ Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: (emacs) Parsing problems replying to encrypted html\r
+In-Reply-To: <87mvpdgp38.fsf@bubblegen.co.uk>\r
+References: <f50e07855e9bbbdd780ef925d8e2d879.squirrel@webmail.plus.net>\r
+ <m2a8miwc6x.fsf@dme.org>\r
+ <c4ff9f2c141441be10b1cb4b1e0300a7.squirrel@webmail.plus.net>\r
+ <56DD48B3.90604@bubblegen.co.uk> <87mvqatr6y.fsf@zancas.localnet>\r
+ <87h9gigfyz.fsf@bubblegen.co.uk> <87pov58b9y.fsf@zancas.localnet>\r
+ <m260wxkvf3.fsf@guru.guru-group.fi> <87wpp76ctq.fsf@zancas.localnet>\r
+ <m2shzvrccn.fsf@dme.org> <87h9fm315q.fsf@bubblegen.co.uk>\r
+ <87oa9timv7.fsf@zancas.localnet>\r
+ <575b60a1d39a1ecc7d06e5c0d625be61.squirrel@webmail.plus.net>\r
+ <87bn5tjw5e.fsf@tesseract.cs.unb.ca>\r
+ <5ed42cd5aafdc045b5d9e1b918d10748.squirrel@webmail.plus.net>\r
+ <87mvpdgp38.fsf@bubblegen.co.uk>\r
+User-Agent: Notmuch/0.21+74~g6c60fb1 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 01 Apr 2016 20:24:05 -0300\r
+Message-ID: <87lh4wj4kq.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 01 Apr 2016 23:24:20 -0000\r
+\r
+Matthew Lear <matt@bubblegen.co.uk> writes:\r
+\r
+>>> Hmm. I can't duplicate the problem replying from show mode with the test\r
+>>> message you provided.  Is the appropriate key in your gpg keyring?\r
+>>\r
+>> Yes it is. I get the gpg gui prompt when opening the encrypted email and\r
+>> can decrypt it prior to show. As I suspected earlier in the thread, I\r
+>> wondered if this was related to some emacs config settings/options that I\r
+>> have. I can't immediately think what they would be though, and why they\r
+>> would trigger this particular issue for html only. Strange...\r
+>\r
+> Do you have the following in your .emacs ?\r
+>\r
+> (setq notmuch-multipart/alternative-discouraged '("text/plain"))\r
+>\r
+> I think that's the work/not-work switch. I'm not sure if it makes sense\r
+> or not in terms of seeing the behaviour I do.\r
+\r
+OK, with that setting I can duplicate the problem replying to encrypted\r
+HTML mail.\r
+\r
+It's also true that notmuch-reply doesn't include the content in the\r
+html version of the multipart/alternative. Unlike notmuch show, it\r
+doesn't have the ability to send parts later, so I guess that's a\r
+problem there.\r
+\r
+The following patch seems to fix it for me. What I haven't worked out is\r
+if it will break other things. Perhaps David E or Mark (in copy) can\r
+comment on whether this is a sensible change, given that we now give the\r
+user control of showing the part on the emacs side.\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index 3c6d685..cd88d79 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -690,7 +690,7 @@ notmuch_reply_format_sprinter(void *ctx,\r
\r
+     /* Start the original */\r
+     sp->map_key (sp, "original");\r
+-    format_part_sprinter (ctx, sp, node, TRUE, TRUE, FALSE);\r
++    format_part_sprinter (ctx, sp, node, TRUE, TRUE, TRUE);\r
\r
+     /* End */\r
+     sp->end (sp);\r
+\r