Re: (emacs) Parsing problems replying to encrypted html
authorDavid Edmondson <dme@dme.org>
Sun, 3 Apr 2016 18:42:04 +0000 (19:42 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:28 +0000 (16:21 -0700)
57/3b5f49f3ee0185e5078476e4620abadf42fea9 [new file with mode: 0644]

diff --git a/57/3b5f49f3ee0185e5078476e4620abadf42fea9 b/57/3b5f49f3ee0185e5078476e4620abadf42fea9
new file mode 100644 (file)
index 0000000..9609b94
--- /dev/null
@@ -0,0 +1,142 @@
+Return-Path: <dme@dme.org>\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 09B386DE0314\r
+ for <notmuch@notmuchmail.org>; Sun,  3 Apr 2016 11:42:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.172\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.172 tagged_above=-999 required=5\r
+ tests=[AWL=-0.105, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001]\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 rtqu_M-e3CVA for <notmuch@notmuchmail.org>;\r
+ Sun,  3 Apr 2016 11:42:09 -0700 (PDT)\r
+Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com\r
+ [209.85.215.54])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 33FBD6DE01C2\r
+ for <notmuch@notmuchmail.org>; Sun,  3 Apr 2016 11:42:09 -0700 (PDT)\r
+Received: by mail-lf0-f54.google.com with SMTP id g184so65241686lfb.3\r
+ for <notmuch@notmuchmail.org>; Sun, 03 Apr 2016 11:42:09 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=dme-org.20150623.gappssmtp.com; s=20150623;\r
+ h=to:cc:subject:in-reply-to:references:from:date:message-id\r
+ :mime-version; bh=Vi4S2oWPnis1sOPPbCY3t+roanIZS7h0duYDSf1A0ls=;\r
+ b=OHHDANTlvVUCkTzdnwnwv6we+uAKcF8DVixuA6DNayj7xjvk76dMoFfsV46D2//gkG\r
+ o7mYajvR5lMjYdJRo5viZkSRNq180+Kj+25/FHFu8F8gYw8DZ5w+JwbgzD77+tBcqTEv\r
+ tm2dMTGDMGJd87ukXgmjRUsVEPZJcnIHB/V7ikjZnsBWFAPyKrjmTk/kHGqQJMKs1XJi\r
+ 1UJvQKRfRfsiMcAXE0GBHNvyL9vkJ6eWI3hIgBH6hwKWAHqq7FIRKIX0XU/0HKku+jQp\r
+ +cBozBZsQ2ul+QQRVi0zAtC/90qTnPnEnndXU7HHyfjGNwb+1NFt2Lz1eYEZ8gqFaGmC\r
+ 6Fsw==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date\r
+ :message-id:mime-version;\r
+ bh=Vi4S2oWPnis1sOPPbCY3t+roanIZS7h0duYDSf1A0ls=;\r
+ b=LB5fJNepU3dZ9UknyWg+wE76syGrDQx5UmJHNAxjnnIQmcw4ThnrOLbbv2cFDI7cfP\r
+ i1QylK5Ozmt5jP6ORB1yf1kZKQThD/xZCwKOAccyP5N4oPCDDW4wIpZ5Dbok2da0Nb3Z\r
+ 0+URIfkwkI1hcLqV2uRUlnR6WCLVL1STlPZ8totQqkH5WPmFH/PHuuPj6HxpwKTNgSrV\r
+ Qf+ohB6ktkRriZKHgY5QNnycaTjnJ8/odegKX0P1aXDkBTOG2Et2kRIj5ZG6ChCnh/uN\r
+ 85IBdZ0gIRewzbADbxFzBNswpIKfSFfoztmWqkMM4NESDhYnqNfGtOLW2AHzDWJOQrFm\r
+ inYA==\r
+X-Gm-Message-State:\r
+ AD7BkJLK+AnOGFf7wEzAcf92oNXc9/lJbx3driVPZF1Rqn9ZGmSNtlaw+o0f6EdqBnuoVw==\r
+X-Received: by 10.194.90.229 with SMTP id bz5mr15387963wjb.143.1459708927434; \r
+ Sun, 03 Apr 2016 11:42:07 -0700 (PDT)\r
+Received: from disaster-area.hh.sledj.net\r
+ ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
+ by smtp.gmail.com with ESMTPSA id u145sm9935345wmu.17.2016.04.03.11.42.06\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sun, 03 Apr 2016 11:42:06 -0700 (PDT)\r
+Received: from localhost (disaster-area.hh.sledj.net [local])\r
+ by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id a4b01762;\r
+ Sun, 3 Apr 2016 18:42:05 +0000 (UTC)\r
+To: David Bremner <david@tethera.net>, Matthew Lear <matt@bubblegen.co.uk>\r
+Cc: notmuch@notmuchmail.org, Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: (emacs) Parsing problems replying to encrypted html\r
+In-Reply-To: <87lh4wj4kq.fsf@zancas.localnet>\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> <87lh4wj4kq.fsf@zancas.localnet>\r
+From: David Edmondson <dme@dme.org>\r
+Date: Sun, 03 Apr 2016 19:42:04 +0100\r
+Message-ID: <m2d1q6356r.fsf@dme.org>\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: Sun, 03 Apr 2016 18:42:18 -0000\r
+\r
+On Sat, Apr 02 2016, David Bremner <david@tethera.net> wrote:\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
+As an alternative, could you try the patch in\r
+id:1459708823-1852-1-git-send-email-dme@dme.org? I think that this is\r
+really a failure on the emacs side rather than in notmuch proper.\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