--- /dev/null
+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 olra.theworths.org (Postfix) with ESMTP id 1EB29431FC0\r
+ for <notmuch@notmuchmail.org>; Sun, 11 May 2014 23:06:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ViCgchGQY30Q for <notmuch@notmuchmail.org>;\r
+ Sun, 11 May 2014 23:06:10 -0700 (PDT)\r
+Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com\r
+ [74.125.82.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 15753431FBF for <notmuch@notmuchmail.org>; Sun, 11 May 2014 23:06:09 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f47.google.com with SMTP id x12so6389415wgg.30\r
+ for <notmuch@notmuchmail.org>; Sun, 11 May 2014 23:06:08 -0700 (PDT)\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:subject:in-reply-to:references:user-agent\r
+ :from:date:message-id:mime-version:content-type;\r
+ bh=xKgfVMpY/eCb2lVDCI5gICXdJKVtKQ9motlajydGzzA=;\r
+ b=H3aC4QWbEvj7RFECdSSHaVMgzFvqy4bHBRLLvpgETjxrCVG/G20ii08QjC+uyse47J\r
+ tn1v2w5LWx0+E35qA4tXgiqoDQY5QWo5sYiMF/TRGkM60K2G0usjL/yZBsvnjV/eKjMv\r
+ kNFxPDzTH6uC5k4rAuK1fuKWvnRt6g6vOvKcYpQWJ46gPZQCeHp0poCn4d3XLAQxvj05\r
+ eia0jPM5QC7JuHamsHsknruP83ZSvGgzWtaN+5sFBBVYFzJw0Y9P2fLZRB8LQKk+NQq3\r
+ mVCPDli2DUPLOSYSJreOWuCGxIttFMgejnMf3TK2Zoa0JetZWqvECPNhwAdzYnQRXYJ/\r
+ tbHg==\r
+X-Gm-Message-State:\r
+ ALoCoQmUoJ1u980KH9gqoU2UmyGeXJMntL96GTfAN1y+Cwcjor4TV3MqUzMgpAfGJpFsaG4WYNtm\r
+X-Received: by 10.180.11.239 with SMTP id t15mr14066263wib.25.1399874768604;\r
+ Sun, 11 May 2014 23:06:08 -0700 (PDT)\r
+Received: from localhost ([2a01:348:1a2:1:a288:b4ff:fe8a:77d8])\r
+ by mx.google.com with ESMTPSA id\r
+ xm20sm14171402wib.19.2014.05.11.23.06.05 for <multiple recipients>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sun, 11 May 2014 23:06:06 -0700 (PDT)\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2] emacs: Improve the cited message included in replies\r
+In-Reply-To: <87ha4y8286.fsf@qmul.ac.uk>\r
+References: <1399482846-25308-1-git-send-email-dme@dme.org>\r
+ <1399530272-11857-1-git-send-email-dme@dme.org>\r
+ <87ha4y8286.fsf@qmul.ac.uk>\r
+User-Agent: Notmuch/0.18 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Mon, 12 May 2014 07:06:00 +0100\r
+Message-ID: <cunzjinbkfr.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 12 May 2014 06:06:18 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+On Sat, May 10 2014, Mark Walters wrote:\r
+> On Thu, 08 May 2014, David Edmondson <dme@dme.org> wrote:\r
+>> emacs: Improve the cited message included in replies\r
+>>\r
+>> v2:\r
+>> - Don't run the text/plain hooks when generating the message to quote.\r
+>>\r
+>\r
+> In principle I like this approach: keeping show and reply closely linked\r
+> seems good.\r
+>\r
+> At the moment, as you say, the tests don't all pass. The first reason is\r
+> that this puts in buttons for the parts. Stopping that happening is not\r
+> completely trivial as we need to make sure that the instruction gets\r
+> passed down to sub-parts of multiparts etc. (You could argue that the\r
+> 'no-button option to notmuch-show-insert-bodypart is buggy as it only\r
+> stops the top level button for the part)\r
+\r
+That seems straightforward. I was sure that there was a variable listing\r
+part types that didn't require buttons (which could be let-bound), but I\r
+must have been imagining it.\r
+\r
+Inserting the button text for the trivial case (single text/plain part)\r
+is already special-cased in the show code. In the case where only a\r
+single part is being shown (e.g. multipart/alternative with text/plain\r
+and text/html with the text/html hidden) it would make sense _not_ to\r
+show the button text. For more complex messages (e.g. multipart/mixed\r
+with text/plain and message/rfc822, where the message/rfc822 contains\r
+multiple parts), showing the button text seems useful to allow the\r
+different sub-sections of the reply to be distinguished.\r
+\r
+Perhaps there is an approach based on the complexity of the quoted\r
+message that should determine whether the button text is inserted (which\r
+might also apply (in modified form?) in normal message display)? Normal\r
+message display has to allow for some interaction with the parts\r
+(show/hide, etc.), which doesn't apply to citation.\r
+\r
+> Secondly, the existing code only includes text sub-parts of the\r
+> message. I would think your version might include any sub-parts show is\r
+> configured to display, including, say images. (However, in my testing\r
+> images didn't seem to be included: I am not sure why.)\r
+\r
+Eek.\r
+\r
+Inserting the images in the reply buffer itself would not be\r
+difficult. What should happen when the user hits 'send'? We currently\r
+don't have a composition mode that would allow us to generate useful\r
+output in that case. Adding one feels like a lot of work. In many cases\r
+it would be necessary to transform the message into HTML to properly\r
+represent the content.\r
+\r
+MML (the markup used in `message-mode') is really not designed for\r
+something this complex.\r
+\r
+> I can't tell how much work it is to modify show to take account of these\r
+> things, so am not sure if this is the best approach, or just adding\r
+> something to deal with rfc822 to our existing reply code is easier.\r
+\r
+The approach in this patch mostly involves removing code - adding\r
+special case code to notmuch-mua.el to support message/rfc822 involves\r
+_adding_ a bunch more complex code (I tried that first).\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1\r
+\r
+iKYEARECAGYFAlNwZMlfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl\r
+bnBncC5maWZ0aGhvcnNlbWFuLm5ldDc1M0Y5NDJDMEExNjc3MDE4OURGMUYyMDY5\r
+RUNEMEFCRjA0OTY1MTYACgkQaezQq/BJZRbo+wCeOQqTZtDN557pZ5U2mMiIB+ce\r
+zJUAnRlQ9BRdK92ajo525yIp3QPOwxxI\r
+=Kvgj\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r