Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 06 / 23073ee348de757f88e74d651b9cadfd499931
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id EA0A66DE173B\r
6  for <notmuch@notmuchmail.org>; Mon,  7 Mar 2016 11:14:47 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.299\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.299 tagged_above=-999 required=5 tests=[AWL=0.271,\r
12   DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13  FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,\r
14  RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]\r
15  autolearn=disabled\r
16 Received: from arlo.cworth.org ([127.0.0.1])\r
17  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
18  with ESMTP id D_Kib-nJgqya for <notmuch@notmuchmail.org>;\r
19  Mon,  7 Mar 2016 11:14:45 -0800 (PST)\r
20 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com\r
21  [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id 65FC36DE1715 for\r
22  <notmuch@notmuchmail.org>; Mon,  7 Mar 2016 11:14:45 -0800 (PST)\r
23 Received: by mail-wm0-f66.google.com with SMTP id n186so12509730wmn.0\r
24  for <notmuch@notmuchmail.org>; Mon, 07 Mar 2016 11:14:45 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26  h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27  :mime-version; bh=mRyrXm67pvmymKERiJMrdtvl4UZFexVn2CG52YAEcF4=;\r
28  b=v21MFF71ysRZ4mE7mIHLisejBrxUxYXRtb0GFGIG7/o224+W5raOE9Z71sRBNu0kcU\r
29  UoywAAmTvozzbyWJQaAOHr7FeoLD052rEA9w/PpbYntX1uW3p/vpmuIVUGoAQGEIHrBb\r
30  lPd5gsCnk+95o8QH6wVt8dhcdZpQUxeSH2bNLZwP1gPZPBaYaYEuFKx6nmPMcLie+QQI\r
31  kqDsSQxz2INtepKnpKrBiZFCR2XZxAPel2hB04MR2tFPkjBB8MF+rEhm26XY4iSzOdQ6\r
32  lD0P2A1pR/SrudLFe7qROzZfCIRktJQzB4jyKu1aSmarfCzMpDeOaffYb6o6ISo5ch+O\r
33  n7LA==\r
34 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
35  d=1e100.net; s=20130820;\r
36  h=x-gm-message-state:from:to:subject:in-reply-to:references\r
37  :user-agent:date:message-id:mime-version;\r
38  bh=mRyrXm67pvmymKERiJMrdtvl4UZFexVn2CG52YAEcF4=;\r
39  b=GIDxpkAv0Ev0mmCQAshUCMC96NRdO6W+641g+mBvOHKJkngHRtkxMs9GbSnW9JXEPB\r
40  /ZCpCVERZtrpKnVnj1+TDnQYU3emTXOP0AT+k4RPHW7jnX7FaLSXp8GAw5NuUXv6xU7O\r
41  V4HBaKWlUoib6xtG6ZQxt4P9bOWhSFIlv3tpfWpGWCN9GfnZgCsHWojbxkQa2QuKh9UH\r
42  59ZoUtxgJ+BoOZgXSDXUTBZcqOtsOXk9j68GIv2lz6BMhQRSdd9mX2qknsFvjfKHzkcB\r
43  ToTLZEQB6xsjRZG0jo+bXTqlT12PSzT0YzfTElyojWJ8XPUKQNsGjnSccRhunbRjPd1U\r
44  REhg==\r
45 X-Gm-Message-State:\r
46  AD7BkJIQEIA+OmaRPNNiTbLJCp5w6T3txndnAZL6Dqf9WOpKTboxl0AzSZTA1a5w5Hv0gg==\r
47 X-Received: by 10.194.23.37 with SMTP id j5mr23714102wjf.171.1457378084081;\r
48  Mon, 07 Mar 2016 11:14:44 -0800 (PST)\r
49 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
50  by smtp.gmail.com with ESMTPSA id 82sm14992855wmd.4.2016.03.07.11.14.43\r
51  (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
52  Mon, 07 Mar 2016 11:14:43 -0800 (PST)\r
53 From: Mark Walters <markwalters1009@gmail.com>\r
54 To: David Edmondson <dme@dme.org>, Jani Nikula <jani@nikula.org>,\r
55  notmuch@notmuchmail.org\r
56 Subject: Re: [PATCH v6 6/6] emacs/mua: Let user specify which parts get a\r
57  header in citations.\r
58 In-Reply-To: <m2a8maurj5.fsf@dme.org>\r
59 References: <1455992680-24978-1-git-send-email-markwalters1009@gmail.com>\r
60  <1455992680-24978-7-git-send-email-markwalters1009@gmail.com>\r
61  <87y49uqkc3.fsf@nikula.org> <m2a8maurj5.fsf@dme.org>\r
62 User-Agent: Notmuch/0.21+69~gd27d908 (http://notmuchmail.org) Emacs/24.4.1\r
63  (x86_64-pc-linux-gnu)\r
64 Date: Mon, 07 Mar 2016 19:14:42 +0000\r
65 Message-ID: <874mciyual.fsf@qmul.ac.uk>\r
66 MIME-Version: 1.0\r
67 Content-Type: text/plain\r
68 X-BeenThere: notmuch@notmuchmail.org\r
69 X-Mailman-Version: 2.1.20\r
70 Precedence: list\r
71 List-Id: "Use and development of the notmuch mail system."\r
72  <notmuch.notmuchmail.org>\r
73 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
74  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
76 List-Post: <mailto:notmuch@notmuchmail.org>\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
78 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
79  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
80 X-List-Received-Date: Mon, 07 Mar 2016 19:14:48 -0000\r
81 \r
82 \r
83 Hi\r
84 \r
85 On Mon, 07 Mar 2016, David Edmondson <dme@dme.org> wrote:\r
86 > On Mon, Mar 07 2016, Jani Nikula wrote:\r
87 >> On Sat, 20 Feb 2016, Mark Walters <markwalters1009@gmail.com> wrote:\r
88 >>> [ text/plain ]\r
89 >>\r
90 >> This patch (or, bisected commit d27d90875dfb emacs/mua: Let user specify\r
91 >> which parts get a header in citations.) causes the above to be added to\r
92 >> all replies. Why?\r
93 >>\r
94 >> I don't understand what "header" the patch is talking about. If it's the\r
95 >> [ text/plain ] above and it's intentional, *shudder*. Who would want\r
96 >> that?\r
97 >\r
98 > We definitely argued about it ages ago (and Mark pointed out as much in\r
99 > his introduction to the patch series), but I don't remember which\r
100 > position I took then :-)\r
101 >\r
102 > Seeing it now, I suspect that `notmuch-show-insert-header-p' is a better\r
103 > default.\r
104 \r
105 This is customisable: notmuch-mua-reply-insert-header-p-function\r
106 I like "No part headers". Dme liked having pdf parts (for example)\r
107 mentioned. It sounds like the help text here needs to be improved. I\r
108 don't have any strong preferences on the default.\r
109 \r
110 Best wishes\r
111 \r
112 Mark\r
113 \r
114 \r
115 \r
116 \r
117 >\r
118 >> BR,\r
119 >> Jani.\r
120 >>\r
121 >>\r
122 >>> From: David Edmondson <dme@dme.org>\r
123 >>>\r
124 >>> Add a customizable function specifying which parts get a header when\r
125 >>> replying, and give some sensible possiblities. These are,\r
126 >>>\r
127 >>> 1) all parts except multipart/*. (Subparts of a multipart part do\r
128 >>> receive a header button.)\r
129 >>>\r
130 >>> 2) only included text/* parts.\r
131 >>>\r
132 >>> 3) Exactly as in the show buffer.\r
133 >>>\r
134 >>> 4) None at all. This means the reply contains a mish-mash of all the\r
135 >>> original message's parts.\r
136 >>>\r
137 >>> In the test suite we set the choice to option 4 to match the\r
138 >>> previous behaviour.\r
139 >>> ---\r
140 >>>  emacs/notmuch-mua.el  | 19 ++++++++++++++++++-\r
141 >>>  emacs/notmuch-show.el | 10 ++++++++++\r
142 >>>  test/test-lib.el      |  4 ++++\r
143 >>>  3 files changed, 32 insertions(+), 1 deletion(-)\r
144 >>>\r
145 >>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
146 >>> index ecc5bec..fcb3e95 100644\r
147 >>> --- a/emacs/notmuch-mua.el\r
148 >>> +++ b/emacs/notmuch-mua.el\r
149 >>> @@ -93,6 +93,23 @@ (defcustom notmuch-mua-cite-function 'message-cite-original\r
150 >>>    :link '(custom-manual "(message)Insertion Variables")\r
151 >>>    :group 'notmuch-reply)\r
152 >>>  \r
153 >>> +(defcustom notmuch-mua-reply-insert-header-p-function\r
154 >>> +  'notmuch-show-reply-insert-header-p-trimmed\r
155 >>> +  "Function to decide which parts get a header when replying.\r
156 >>> +\r
157 >>> +This function specifies which parts of a mime message with\r
158 >>> +mutiple parts get a header."\r
159 >>> +  :type '(radio (const :tag "All except multipart/* and hidden parts"\r
160 >>> +                          notmuch-show-reply-insert-header-p-trimmed)\r
161 >>> +           (const :tag "Only for included text parts"\r
162 >>> +                          notmuch-show-reply-insert-header-p-minimal)\r
163 >>> +           (const :tag "Exactly as in show view"\r
164 >>> +                          notmuch-show-insert-header-p)\r
165 >>> +           (const :tag "No part headers"\r
166 >>> +                          notmuch-show-reply-insert-header-p-never)\r
167 >>> +           (function :tag "Other"))\r
168 >>> +  :group 'notmuch-reply)\r
169 >>> +\r
170 >>>  ;;\r
171 >>>  \r
172 >>>  (defun notmuch-mua-get-switch-function ()\r
173 >>> @@ -231,7 +248,7 @@ (defun notmuch-mua-reply (query-string &optional sender reply-all)\r
174 >>>                    ;; Don't omit long parts.\r
175 >>>                    (notmuch-show-max-text-part-size 0)\r
176 >>>                    ;; Insert headers for parts as appropriate for replying.\r
177 >>> -                  (notmuch-show-insert-header-p-function #'notmuch-show-reply-insert-header-p-never))\r
178 >>> +                  (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function))\r
179 >>>                 (notmuch-show-insert-body original (plist-get original :body) 0)\r
180 >>>                 (buffer-substring-no-properties (point-min) (point-max)))))\r
181 >>>  \r
182 >>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
183 >>> index 2a81ec1..371e62d 100644\r
184 >>> --- a/emacs/notmuch-show.el\r
185 >>> +++ b/emacs/notmuch-show.el\r
186 >>> @@ -954,6 +954,16 @@ (defun notmuch-show-insert-header-p (part hide)\r
187 >>>  (defun notmuch-show-reply-insert-header-p-never (part hide)\r
188 >>>    nil)\r
189 >>>  \r
190 >>> +(defun notmuch-show-reply-insert-header-p-trimmed (part hide)\r
191 >>> +  (let ((mime-type (notmuch-show-mime-type part)))\r
192 >>> +    (and (not (notmuch-match-content-type mime-type "multipart/*"))\r
193 >>> +    (not hide))))\r
194 >>> +\r
195 >>> +(defun notmuch-show-reply-insert-header-p-minimal (part hide)\r
196 >>> +  (let ((mime-type (notmuch-show-mime-type part)))\r
197 >>> +    (and (notmuch-match-content-type mime-type "text/*")\r
198 >>> +    (not hide))))\r
199 >>> +\r
200 >>>  (defun notmuch-show-insert-bodypart (msg part depth &optional hide)\r
201 >>>    "Insert the body part PART at depth DEPTH in the current thread.\r
202 >>>  \r
203 >>> diff --git a/test/test-lib.el b/test/test-lib.el\r
204 >>> index 596a705..02e020c 100644\r
205 >>> --- a/test/test-lib.el\r
206 >>> +++ b/test/test-lib.el\r
207 >>> @@ -184,6 +184,10 @@ (defmacro notmuch-test-progn (&rest body)\r
208 >>>  (setq notmuch-tag-deleted-formats\r
209 >>>        '((".*" nil)))\r
210 >>>  \r
211 >>> +;; For historical reasonse we don't print part headers when replying\r
212 >>> +;; in the tests suite\r
213 >>> +(setq notmuch-mua-reply-insert-header-p-function 'notmuch-show-reply-insert-header-p-never)\r
214 >>> +\r
215 >>>  ;; force a common html renderer, to avoid test variations between\r
216 >>>  ;; environments\r
217 >>>  \r
218 >>> -- \r
219 >>> 2.1.4\r
220 >>>\r
221 >>> _______________________________________________\r
222 >>> notmuch mailing list\r
223 >>> notmuch@notmuchmail.org\r
224 >>> https://notmuchmail.org/mailman/listinfo/notmuch\r
225 >> _______________________________________________\r
226 >> notmuch mailing list\r
227 >> notmuch@notmuchmail.org\r
228 >> https://notmuchmail.org/mailman/listinfo/notmuch\r