--- /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 arlo.cworth.org (Postfix) with ESMTP id 3DDBB6DE1410\r
+ for <notmuch@notmuchmail.org>; Mon, 7 Mar 2016 09:28:05 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.135\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.135 tagged_above=-999 required=5\r
+ tests=[AWL=-0.068, 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 mWF2-dHVqu86 for <notmuch@notmuchmail.org>;\r
+ Mon, 7 Mar 2016 09:28:02 -0800 (PST)\r
+Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com\r
+ [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id 80BFB6DE140C for\r
+ <notmuch@notmuchmail.org>; Mon, 7 Mar 2016 09:28:02 -0800 (PST)\r
+Received: by mail-wm0-f65.google.com with SMTP id n186so12014592wmn.0\r
+ for <notmuch@notmuchmail.org>; Mon, 07 Mar 2016 09:28:02 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=dme-org.20150623.gappssmtp.com; s=20150623;\r
+ h=to:subject:in-reply-to:references:from:date:message-id:mime-version;\r
+ bh=GNwpdXSLiM+UxMJnuNc2HuVYsX/c4T7P/N8FhRIZ5Eg=;\r
+ b=BtD0qEGA9Z92IfCaFQrh7S0nFCwaJMVGBgPt5plGOollAb5Wz6GFxJ1lD0uplH/Um7\r
+ nJ36jdWajx1uHAhDh2+WG21b/csidLMR93f+Xz78GXedbBI2jwn71o+ASAOewt9ipwb1\r
+ PtHDZZRMovn39mxJudC6b4FZBLlZExUfkgeOResHuFofmGGuijnGqqEfGo0BS0qZNupO\r
+ dw8QRdmQVqQlxBcl6hZjoznC8YsHBV3uyoYH92fKA3EM//JdIazh7T3WrqjeerlqvIbt\r
+ b44iJEwBtEp3tAzmZcjBarD9QX+QVEtTYp7wEnfhYlJmnpY+aRz7T3y9J2RPMQ2SmPPl\r
+ RRTQ==\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:from:date\r
+ :message-id:mime-version;\r
+ bh=GNwpdXSLiM+UxMJnuNc2HuVYsX/c4T7P/N8FhRIZ5Eg=;\r
+ b=matW3LSngeSjJpWX0k7yfMnPYrW4aq+cI0n+pLyG1eZrVP2csW4OQufX9+DU8z1swc\r
+ Hkx1JbCOrT7cX3zBwDzxKH2cxc6AvFFDyfYU5p4usFYJXooDaQi5AF4cifAscZBe71X2\r
+ SwDm2b/ReI6dZrjPQUkHnb22jlqelPb2B9QETNFEzEKh3MhfDLondiqaD7Y9yU7AjgMO\r
+ Gc6gE8LmTkFh3brsRFmr00N43bsc2m+fXf80SHAJA0EdJtWkO3bE89IXMHip1NyWYJwY\r
+ hf6Zfw3gcof6HLIgfndQVNjTp+2UvJMiXmD4U8BwmwlZBYJttkOQ5GSLRVqgYWe52Y4X\r
+ Gq/w==\r
+X-Gm-Message-State:\r
+ AD7BkJKsKv8HxgNdcpjPo1ZpfmHJfQ2tCSMhnoPIIkdW95rWsFwv9AO8mBncO1z4THgj6Q==\r
+X-Received: by 10.28.17.141 with SMTP id 135mr2839440wmr.48.1457371681162;\r
+ Mon, 07 Mar 2016 09:28:01 -0800 (PST)\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 t3sm19023974wjz.11.2016.03.07.09.27.59\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Mon, 07 Mar 2016 09:27:59 -0800 (PST)\r
+Received: from localhost (disaster-area.hh.sledj.net [local])\r
+ by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 3f2f74c1;\r
+ Mon, 7 Mar 2016 17:27:58 +0000 (UTC)\r
+To: Jani Nikula <jani@nikula.org>, Mark Walters <markwalters1009@gmail.com>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v6 6/6] emacs/mua: Let user specify which parts get a\r
+ header in citations.\r
+In-Reply-To: <87y49uqkc3.fsf@nikula.org>\r
+References: <1455992680-24978-1-git-send-email-markwalters1009@gmail.com>\r
+ <1455992680-24978-7-git-send-email-markwalters1009@gmail.com>\r
+ <87y49uqkc3.fsf@nikula.org>\r
+From: David Edmondson <dme@dme.org>\r
+Date: Mon, 07 Mar 2016 17:27:58 +0000\r
+Message-ID: <m2a8maurj5.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: Mon, 07 Mar 2016 17:28:05 -0000\r
+\r
+On Mon, Mar 07 2016, Jani Nikula wrote:\r
+> On Sat, 20 Feb 2016, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>> [ text/plain ]\r
+>\r
+> This patch (or, bisected commit d27d90875dfb emacs/mua: Let user specify\r
+> which parts get a header in citations.) causes the above to be added to\r
+> all replies. Why?\r
+>\r
+> I don't understand what "header" the patch is talking about. If it's the\r
+> [ text/plain ] above and it's intentional, *shudder*. Who would want\r
+> that?\r
+\r
+We definitely argued about it ages ago (and Mark pointed out as much in\r
+his introduction to the patch series), but I don't remember which\r
+position I took then :-)\r
+\r
+Seeing it now, I suspect that `notmuch-show-insert-header-p' is a better\r
+default.\r
+\r
+> BR,\r
+> Jani.\r
+>\r
+>\r
+>> From: David Edmondson <dme@dme.org>\r
+>>\r
+>> Add a customizable function specifying which parts get a header when\r
+>> replying, and give some sensible possiblities. These are,\r
+>>\r
+>> 1) all parts except multipart/*. (Subparts of a multipart part do\r
+>> receive a header button.)\r
+>>\r
+>> 2) only included text/* parts.\r
+>>\r
+>> 3) Exactly as in the show buffer.\r
+>>\r
+>> 4) None at all. This means the reply contains a mish-mash of all the\r
+>> original message's parts.\r
+>>\r
+>> In the test suite we set the choice to option 4 to match the\r
+>> previous behaviour.\r
+>> ---\r
+>> emacs/notmuch-mua.el | 19 ++++++++++++++++++-\r
+>> emacs/notmuch-show.el | 10 ++++++++++\r
+>> test/test-lib.el | 4 ++++\r
+>> 3 files changed, 32 insertions(+), 1 deletion(-)\r
+>>\r
+>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+>> index ecc5bec..fcb3e95 100644\r
+>> --- a/emacs/notmuch-mua.el\r
+>> +++ b/emacs/notmuch-mua.el\r
+>> @@ -93,6 +93,23 @@ (defcustom notmuch-mua-cite-function 'message-cite-original\r
+>> :link '(custom-manual "(message)Insertion Variables")\r
+>> :group 'notmuch-reply)\r
+>> \r
+>> +(defcustom notmuch-mua-reply-insert-header-p-function\r
+>> + 'notmuch-show-reply-insert-header-p-trimmed\r
+>> + "Function to decide which parts get a header when replying.\r
+>> +\r
+>> +This function specifies which parts of a mime message with\r
+>> +mutiple parts get a header."\r
+>> + :type '(radio (const :tag "All except multipart/* and hidden parts"\r
+>> + notmuch-show-reply-insert-header-p-trimmed)\r
+>> + (const :tag "Only for included text parts"\r
+>> + notmuch-show-reply-insert-header-p-minimal)\r
+>> + (const :tag "Exactly as in show view"\r
+>> + notmuch-show-insert-header-p)\r
+>> + (const :tag "No part headers"\r
+>> + notmuch-show-reply-insert-header-p-never)\r
+>> + (function :tag "Other"))\r
+>> + :group 'notmuch-reply)\r
+>> +\r
+>> ;;\r
+>> \r
+>> (defun notmuch-mua-get-switch-function ()\r
+>> @@ -231,7 +248,7 @@ (defun notmuch-mua-reply (query-string &optional sender reply-all)\r
+>> ;; Don't omit long parts.\r
+>> (notmuch-show-max-text-part-size 0)\r
+>> ;; Insert headers for parts as appropriate for replying.\r
+>> - (notmuch-show-insert-header-p-function #'notmuch-show-reply-insert-header-p-never))\r
+>> + (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function))\r
+>> (notmuch-show-insert-body original (plist-get original :body) 0)\r
+>> (buffer-substring-no-properties (point-min) (point-max)))))\r
+>> \r
+>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+>> index 2a81ec1..371e62d 100644\r
+>> --- a/emacs/notmuch-show.el\r
+>> +++ b/emacs/notmuch-show.el\r
+>> @@ -954,6 +954,16 @@ (defun notmuch-show-insert-header-p (part hide)\r
+>> (defun notmuch-show-reply-insert-header-p-never (part hide)\r
+>> nil)\r
+>> \r
+>> +(defun notmuch-show-reply-insert-header-p-trimmed (part hide)\r
+>> + (let ((mime-type (notmuch-show-mime-type part)))\r
+>> + (and (not (notmuch-match-content-type mime-type "multipart/*"))\r
+>> + (not hide))))\r
+>> +\r
+>> +(defun notmuch-show-reply-insert-header-p-minimal (part hide)\r
+>> + (let ((mime-type (notmuch-show-mime-type part)))\r
+>> + (and (notmuch-match-content-type mime-type "text/*")\r
+>> + (not hide))))\r
+>> +\r
+>> (defun notmuch-show-insert-bodypart (msg part depth &optional hide)\r
+>> "Insert the body part PART at depth DEPTH in the current thread.\r
+>> \r
+>> diff --git a/test/test-lib.el b/test/test-lib.el\r
+>> index 596a705..02e020c 100644\r
+>> --- a/test/test-lib.el\r
+>> +++ b/test/test-lib.el\r
+>> @@ -184,6 +184,10 @@ (defmacro notmuch-test-progn (&rest body)\r
+>> (setq notmuch-tag-deleted-formats\r
+>> '((".*" nil)))\r
+>> \r
+>> +;; For historical reasonse we don't print part headers when replying\r
+>> +;; in the tests suite\r
+>> +(setq notmuch-mua-reply-insert-header-p-function 'notmuch-show-reply-insert-header-p-never)\r
+>> +\r
+>> ;; force a common html renderer, to avoid test variations between\r
+>> ;; environments\r
+>> \r
+>> -- \r
+>> 2.1.4\r
+>>\r
+>> _______________________________________________\r
+>> notmuch mailing list\r
+>> notmuch@notmuchmail.org\r
+>> https://notmuchmail.org/mailman/listinfo/notmuch\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> https://notmuchmail.org/mailman/listinfo/notmuch\r