--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\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 EA0A66DE173B\r
+ for <notmuch@notmuchmail.org>; Mon, 7 Mar 2016 11:14:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.299\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.299 tagged_above=-999 required=5 tests=[AWL=0.271,\r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 D_Kib-nJgqya for <notmuch@notmuchmail.org>;\r
+ Mon, 7 Mar 2016 11:14:45 -0800 (PST)\r
+Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com\r
+ [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id 65FC36DE1715 for\r
+ <notmuch@notmuchmail.org>; Mon, 7 Mar 2016 11:14:45 -0800 (PST)\r
+Received: by mail-wm0-f66.google.com with SMTP id n186so12509730wmn.0\r
+ for <notmuch@notmuchmail.org>; Mon, 07 Mar 2016 11:14:45 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version; bh=mRyrXm67pvmymKERiJMrdtvl4UZFexVn2CG52YAEcF4=;\r
+ b=v21MFF71ysRZ4mE7mIHLisejBrxUxYXRtb0GFGIG7/o224+W5raOE9Z71sRBNu0kcU\r
+ UoywAAmTvozzbyWJQaAOHr7FeoLD052rEA9w/PpbYntX1uW3p/vpmuIVUGoAQGEIHrBb\r
+ lPd5gsCnk+95o8QH6wVt8dhcdZpQUxeSH2bNLZwP1gPZPBaYaYEuFKx6nmPMcLie+QQI\r
+ kqDsSQxz2INtepKnpKrBiZFCR2XZxAPel2hB04MR2tFPkjBB8MF+rEhm26XY4iSzOdQ6\r
+ lD0P2A1pR/SrudLFe7qROzZfCIRktJQzB4jyKu1aSmarfCzMpDeOaffYb6o6ISo5ch+O\r
+ n7LA==\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:from:to:subject:in-reply-to:references\r
+ :user-agent:date:message-id:mime-version;\r
+ bh=mRyrXm67pvmymKERiJMrdtvl4UZFexVn2CG52YAEcF4=;\r
+ b=GIDxpkAv0Ev0mmCQAshUCMC96NRdO6W+641g+mBvOHKJkngHRtkxMs9GbSnW9JXEPB\r
+ /ZCpCVERZtrpKnVnj1+TDnQYU3emTXOP0AT+k4RPHW7jnX7FaLSXp8GAw5NuUXv6xU7O\r
+ V4HBaKWlUoib6xtG6ZQxt4P9bOWhSFIlv3tpfWpGWCN9GfnZgCsHWojbxkQa2QuKh9UH\r
+ 59ZoUtxgJ+BoOZgXSDXUTBZcqOtsOXk9j68GIv2lz6BMhQRSdd9mX2qknsFvjfKHzkcB\r
+ ToTLZEQB6xsjRZG0jo+bXTqlT12PSzT0YzfTElyojWJ8XPUKQNsGjnSccRhunbRjPd1U\r
+ REhg==\r
+X-Gm-Message-State:\r
+ AD7BkJIQEIA+OmaRPNNiTbLJCp5w6T3txndnAZL6Dqf9WOpKTboxl0AzSZTA1a5w5Hv0gg==\r
+X-Received: by 10.194.23.37 with SMTP id j5mr23714102wjf.171.1457378084081;\r
+ Mon, 07 Mar 2016 11:14:44 -0800 (PST)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by smtp.gmail.com with ESMTPSA id 82sm14992855wmd.4.2016.03.07.11.14.43\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Mon, 07 Mar 2016 11:14:43 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: David Edmondson <dme@dme.org>, Jani Nikula <jani@nikula.org>,\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: <m2a8maurj5.fsf@dme.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> <m2a8maurj5.fsf@dme.org>\r
+User-Agent: Notmuch/0.21+69~gd27d908 (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 07 Mar 2016 19:14:42 +0000\r
+Message-ID: <874mciyual.fsf@qmul.ac.uk>\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 19:14:48 -0000\r
+\r
+\r
+Hi\r
+\r
+On Mon, 07 Mar 2016, David Edmondson <dme@dme.org> wrote:\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
+This is customisable: notmuch-mua-reply-insert-header-p-function\r
+I like "No part headers". Dme liked having pdf parts (for example)\r
+mentioned. It sounds like the help text here needs to be improved. I\r
+don't have any strong preferences on the default.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+\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