Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 2e / 6d46232f4f4bbe26d72d256acae61bee64feee
1 Return-Path: <amdragon@mit.edu>\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 olra.theworths.org (Postfix) with ESMTP id 1A15C431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 15 Mar 2013 21:10:14 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id g2ONmVIjUJDM for <notmuch@notmuchmail.org>;\r
16         Fri, 15 Mar 2013 21:10:12 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
18         [18.7.68.36])\r
19         by olra.theworths.org (Postfix) with ESMTP id 73063431FAE\r
20         for <notmuch@notmuchmail.org>; Fri, 15 Mar 2013 21:10:12 -0700 (PDT)\r
21 X-AuditID: 12074424-b7f936d0000008eb-f8-5143f0a28265\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
23         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 8A.52.02283.2A0F3415; Sat, 16 Mar 2013 00:10:10 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r2G4A85c027653; \r
27         Sat, 16 Mar 2013 00:10:09 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r2G4A6P9018399\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Sat, 16 Mar 2013 00:10:07 -0400\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1UGiRZ-0001Y7-Nx; Sat, 16 Mar 2013 00:10:05 -0400\r
37 From: Austin Clements <amdragon@MIT.EDU>\r
38 To: Damien Cassou <damien.cassou@gmail.com>, notmuch@notmuchmail.org\r
39 Subject: Re: [PATCH 2/2] emacs: possibility to customize the rendering of tags\r
40 In-Reply-To: <1360162435-29506-3-git-send-email-damien.cassou@gmail.com>\r
41 References: <1360162435-29506-1-git-send-email-damien.cassou@gmail.com>\r
42         <1360162435-29506-3-git-send-email-damien.cassou@gmail.com>\r
43 User-Agent: Notmuch/0.15+6~g7d4cb73 (http://notmuchmail.org) Emacs/23.4.1\r
44         (i486-pc-linux-gnu)\r
45 Date: Sat, 16 Mar 2013 00:10:05 -0400\r
46 Message-ID: <87sj3w56jm.fsf@awakening.csail.mit.edu>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=utf-8\r
49 Content-Transfer-Encoding: quoted-printable\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IR4hRV1l30wTnQYHkbv8Wuu1uZLK7fnMns\r
52         wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGXsPLWXraAxs2L2qTamBsYPQV2MnBwSAiYS\r
53         p6ffZYWwxSQu3FvP1sXIxSEksI9RYsOif4wQzkZGiX/HF0I5p5kkFnXNZYdwljBKvHt0lwWk\r
54         n01AQ2Lb/uWMILaIgIvEzFPdYHOFBfwkHv44yQRicwp4SBy83gtmCwk0M0o8eOcGYosKxEpM\r
55         Pz0BaA4HB4uAqkTLQheQMC/QeYe3rWSHsAUlTs58AraKWUBd4s+8S8wQtrbEsoWvmScwCs5C\r
56         UjYLSdksJGULGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zrr5WaW6KWmlG5iBIUwu4vKDsbm\r
57         Q0qHGAU4GJV4eCvtnAOFWBPLiitzDzFKcjApifJa3gUK8SXlp1RmJBZnxBeV5qQWH2KU4GBW\r
58         EuF9pw+U401JrKxKLcqHSUlzsCiJ815PuekvJJCeWJKanZpakFoEk5Xh4FCS4JV/D9QoWJSa\r
59         nlqRlplTgpBm4uAEGc4DNDwFpIa3uCAxtzgzHSJ/itGYY8G1Ry8YOZa8BpJCLHn5ealS4ryf\r
60         3gGVCoCUZpTmwU2DpaFXjOJAzwnzWoAM5AGmMLh5r4BWMQGt2nfFCWRVSSJCSqqBcYPMV6aj\r
61         udkJabNK1ykdq++9Lx/LeG9WeaHTz32Bvh8zq2+yPrqUXhS+9I+EbVBmwzIhm+DAxtMbb0R/\r
62         e7qyoO2pxTKzjn9PLtzUiFec5yZyum33br0MppMLMl+WmT/YsGVD444s/p6sYKFvya5dNvId\r
63         x+fY2N5dLPMyeQsDZ3iJxLeSOqUrSizFGYmGWsxFxYkAhMcH2x4DAAA=\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Sat, 16 Mar 2013 04:10:14 -0000\r
77 \r
78 (Decided I needed a brief break from working continuously.  I haven't\r
79 been following the mailing list at all, so I don't know if there's been\r
80 additional context relevant to this patch series, but this at least\r
81 appears to be the latest version.)\r
82 \r
83 This is looking really good.  Just a few tiny comments below.\r
84 \r
85 On Wed, 06 Feb 2013, Damien Cassou <damien.cassou@gmail.com> wrote:\r
86 > This patch extracts the rendering of tags in notmuch-show to\r
87 > the notmuch-tag file.\r
88 >\r
89 > This file introduces a `notmuch-tag-formats' variable that associates\r
90 > each tag to a particular format. This variable can be customized\r
91 > thanks to the work of Austin Clements. For example,\r
92 >\r
93 >   '(("unread" (propertize tag 'face '(:foreground "red")))\r
94 >     ("flagged" (notmuch-tag-format-image tag "star.svg")))\r
95 >\r
96 > associates a red foreground to the "unread" tag and a star picture to\r
97 > the "flagged" tag.\r
98 >\r
99 > Signed-off-by: Damien Cassou <damien.cassou@gmail.com>\r
100 > ---\r
101 >  emacs/notmuch-show.el |    6 +-\r
102 >  emacs/notmuch-tag.el  |  221 +++++++++++++++++++++++++++++++++++++++++++=\r
103 +++++-\r
104 >  emacs/notmuch.el      |    5 +-\r
105 >  3 files changed, 224 insertions(+), 8 deletions(-)\r
106 >\r
107 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
108 > index 1864dd1..bb4bd92 100644\r
109 > --- a/emacs/notmuch-show.el\r
110 > +++ b/emacs/notmuch-show.el\r
111 > @@ -362,8 +362,7 @@ operation on the contents of the current buffer."\r
112 >      (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)\r
113 >       (let ((inhibit-read-only t))\r
114 >         (replace-match (concat "("\r
115 > -                              (propertize (mapconcat 'identity tags " ")\r
116 > -                                          'face 'notmuch-tag-face)\r
117 > +                              (notmuch-tag-format-tags tags)\r
118 >                                ")"))))))\r
119 >=20=20\r
120 >  (defun notmuch-clean-address (address)\r
121 > @@ -441,8 +440,7 @@ message at DEPTH in the current thread."\r
122 >           " ("\r
123 >           date\r
124 >           ") ("\r
125 > -         (propertize (mapconcat 'identity tags " ")\r
126 > -                     'face 'notmuch-tag-face)\r
127 > +         (notmuch-tag-format-tags tags)\r
128 >           ")\n")\r
129 >      (overlay-put (make-overlay start (point)) 'face 'notmuch-message-sum=\r
130 mary-face)))\r
131 >=20=20\r
132 > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
133 > index 4fce3a9..2a64d48 100644\r
134 > --- a/emacs/notmuch-tag.el\r
135 > +++ b/emacs/notmuch-tag.el\r
136 > @@ -1,5 +1,6 @@\r
137 >  ;; notmuch-tag.el --- tag messages within emacs\r
138 >  ;;\r
139 > +;; Copyright =C2=A9 Damien Cassou\r
140 >  ;; Copyright =C2=A9 Carl Worth\r
141 >  ;;\r
142 >  ;; This file is part of Notmuch.\r
143 > @@ -18,11 +19,229 @@\r
144 >  ;; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.\r
145 >  ;;\r
146 >  ;; Authors: Carl Worth <cworth@cworth.org>\r
147 > +;;          Damien Cassou <damien.cassou@gmail.com>\r
148 > +;;\r
149 > +;;; Code:\r
150 > +;;\r
151 >=20=20\r
152 > -(eval-when-compile (require 'cl))\r
153 > +(require 'cl)\r
154 >  (require 'crm)\r
155 >  (require 'notmuch-lib)\r
156 >=20=20\r
157 > +(defcustom notmuch-tag-formats\r
158 > +  '(("unread" (propertize tag 'face '(:foreground "red")))\r
159 > +    ("flagged" (notmuch-tag-format-image-data tag (notmuch-tag-star-icon=\r
160 ))))\r
161 > +  "Custom formats for individual tags.\r
162 > +\r
163 > +This gives a list that maps from tag names to lists of formatting\r
164 > +expressions.  The car of each element gives a tag name and the\r
165 > +cdr gives a list of Elisp expressions that modify the tag.  If\r
166 > +the list is empty, the tag will simply be hidden.  Otherwise,\r
167 > +each expression will be evaluated in order: for the first\r
168 > +expression, the variable `tag' will be bound to the tag name; for\r
169 > +each later expression, the variable `tag' will be bound to the\r
170 > +result of the previous expression.  In this way, each expression\r
171 > +can build on the formatting performed by the previous expression.\r
172 > +The result of the last expression will displayed in place of the\r
173 > +tag.\r
174 > +\r
175 > +For example, to replace a tag with another string, simply use\r
176 > +that string as a formatting expression.  To change the foreground\r
177 > +of a tag to red, use the expression\r
178 > +  (propertize tag 'face '(:foreground \"red\"))\r
179 > +\r
180 > +See also `notmuch-tag-format-image', which can help replace tags\r
181 > +with images."\r
182 > +\r
183 > +  :group 'notmuch-search\r
184 > +  :group 'notmuch-show\r
185 > +  :type '(alist :key-type (string :tag "Tag")\r
186 > +             :extra-offset -3\r
187 > +             :value-type\r
188 > +             (radio :format "%v"\r
189 > +                    (const :tag "Hidden" nil)\r
190 > +                    (set :tag "Modified"\r
191 > +                         (string :tag "Display as")\r
192 > +                         (list :tag "Face" :extra-offset -4\r
193 > +                               (const :format "" :inline t\r
194 > +                                      (propertize tag 'face))\r
195 > +                               (list :format "%v"\r
196 > +                                     (const :format "" quote)\r
197 > +                                     custom-face-edit))\r
198 > +                         (list :format "%v" :extra-offset -4\r
199 > +                               (const :format "" :inline t\r
200 > +                                      (notmuch-tag-format-image-data tag))\r
201 > +                               (choice :tag "Image"\r
202 > +                                       (const :tag "Star"\r
203 > +                                              (notmuch-tag-star-icon))\r
204 > +                                       (const :tag "Empty star"\r
205 > +                                              (notmuch-tag-star-empty-icon))\r
206 > +                                       (const :tag "Tag"\r
207 > +                                              (notmuch-tag-tag-icon))\r
208 > +                                       (string :tag "Custom")))\r
209 > +                         (sexp :tag "Custom")))))\r
210 > +\r
211 > +(defun notmuch-tag-format-image-data (tag data)\r
212 > +  "Replace TAG with image DATA, if available.\r
213 > +\r
214 > +This function returns a propertized string that will display image\r
215 > +DATA in place of TAG.This is designed for use in\r
216 > +`notmuch-tag-formats'.\r
217 > +\r
218 > +DATA is the content of an SVG picture (e.g., as returned by\r
219 > +`notmuch-tag-star-icon')."\r
220 > +  (propertize tag 'display\r
221 > +           `(image :type svg\r
222 > +                   :data ,data\r
223 > +                   :ascent center\r
224 > +                   :mask heuristic)))\r
225 > +\r
226 > +(defun notmuch-tag-star-icon ()\r
227 > +  "Return SVG data representing a star icon.\r
228 > +This can be used with `notmuch-tag-format-image-data'."\r
229 > +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
230 > +<svg\r
231 > +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
232 > +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
233 > +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
234 > +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
235 > +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
236 > +   version=3D\"1.1\"\r
237 > +   width=3D\"16\"\r
238 > +   height=3D\"16\"\r
239 > +   id=3D\"svg2\">\r
240 > +  <defs\r
241 > +     id=3D\"defs4\" />\r
242 > +  <metadata\r
243 > +     id=3D\"metadata7\">\r
244 > +    <rdf:RDF>\r
245 > +      <cc:Work\r
246 > +         rdf:about=3D\"\">\r
247 > +        <dc:format>image/svg+xml</dc:format>\r
248 > +        <dc:type\r
249 > +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
250 > +        <dc:title></dc:title>\r
251 > +      </cc:Work>\r
252 > +    </rdf:RDF>\r
253 > +  </metadata>\r
254 > +  <g\r
255 > +     transform=3D\"translate(-242.81601,-315.59635)\"\r
256 > +     id=3D\"layer1\">\r
257 > +    <path\r
258 > +       d=3D\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447=\r
259  5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7=\r
260 .34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"\r
261 > +       transform=3D\"matrix(0.2484147,-0.02623394,0.02623394,0.2484147,1=\r
262 74.63605,255.37691)\"\r
263 > +       id=3D\"path2985\"\r
264 > +       style=3D\"fill:#ffff00;fill-rule:evenodd;stroke:#000000;stroke-wi=\r
265 dth:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\" />\r
266 > +  </g>\r
267 > +</svg>")\r
268 \r
269 You could simplify these SVGs much further.  You can remove the defs and\r
270 metadata blocks, and then remove all of the xmlns:* properties (keeping\r
271 just the root namespace).  You can also remove the id properties.  I\r
272 think you can even remove the g, leaving only the path, since it's only\r
273 a translate and I'm pretty sure the origin doesn't matter.\r
274 \r
275 > +\r
276 > +(defun notmuch-tag-star-empty-icon ()\r
277 > +  "Return SVG data representing an empty star icon.\r
278 > +This can be used with `notmuch-tag-format-image-data'."\r
279 > +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
280 > +<!-- Created with Inkscape (http://www.inkscape.org/) -->\r
281 > +\r
282 > +<svg\r
283 > +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
284 > +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
285 > +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
286 > +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
287 > +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
288 > +   version=3D\"1.1\"\r
289 > +   width=3D\"16\"\r
290 > +   height=3D\"16\"\r
291 > +   id=3D\"svg2\">\r
292 > +  <defs\r
293 > +     id=3D\"defs4\" />\r
294 > +  <metadata\r
295 > +     id=3D\"metadata7\">\r
296 > +    <rdf:RDF>\r
297 > +      <cc:Work\r
298 > +         rdf:about=3D\"\">\r
299 > +        <dc:format>image/svg+xml</dc:format>\r
300 > +        <dc:type\r
301 > +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
302 > +        <dc:title></dc:title>\r
303 > +      </cc:Work>\r
304 > +    </rdf:RDF>\r
305 > +  </metadata>\r
306 > +  <g\r
307 > +     transform=3D\"translate(-242.81601,-315.59635)\"\r
308 > +     id=3D\"layer1\">\r
309 > +    <path\r
310 > +       d=3D\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447=\r
311  5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7=\r
312 .34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"\r
313 > +       transform=3D\"matrix(0.2484147,-0.02623394,0.02623394,0.2484147,1=\r
314 74.63605,255.37691)\"\r
315 > +       id=3D\"path2985\"\r
316 > +       style=3D\"fill:#d6d6d1;fill-opacity:1;fill-rule:evenodd;stroke:#0=\r
317 00000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opa=\r
318 city:1\" />\r
319 > +  </g>\r
320 > +</svg>")\r
321 > +\r
322 > +(defun notmuch-tag-tag-icon ()\r
323 > +  "Return SVG data representing a tag icon.\r
324 > +This can be used with `notmuch-tag-format-image-data'."\r
325 > +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
326 > +<!-- Created with Inkscape (http://www.inkscape.org/) -->\r
327 > +\r
328 > +<svg\r
329 > +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
330 > +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
331 > +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
332 > +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
333 > +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
334 > +   version=3D\"1.1\"\r
335 > +   width=3D\"16\"\r
336 > +   height=3D\"16\"\r
337 > +   id=3D\"svg3805\">\r
338 > +  <defs\r
339 > +     id=3D\"defs3807\" />\r
340 > +  <metadata\r
341 > +     id=3D\"metadata3810\">\r
342 > +    <rdf:RDF>\r
343 > +      <cc:Work\r
344 > +         rdf:about=3D\"\">\r
345 > +        <dc:format>image/svg+xml</dc:format>\r
346 > +        <dc:type\r
347 > +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
348 > +        <dc:title></dc:title>\r
349 > +      </cc:Work>\r
350 > +    </rdf:RDF>\r
351 > +  </metadata>\r
352 > +  <g\r
353 > +     transform=3D\"translate(0,-1036.3622)\"\r
354 > +     id=3D\"layer1\">\r
355 > +    <path\r
356 > +       d=3D\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700=\r
357 893,3.616 -12.50000043,0 z\"\r
358 > +       id=3D\"rect4321\"\r
359 > +       style=3D\"fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#0=\r
360 00000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-mi=\r
361 terlimit:4;stroke-opacity:1\" />\r
362 > +  </g>\r
363 > +</svg>")\r
364 > +\r
365 > +(defun notmuch-tag-get-format (tag)\r
366 > +  "Return the format for TAG in `notmuch-tag-formats'."\r
367 \r
368 Hmm.  I read this as simply returning the format from\r
369 notmuch-tag-formats, like just the assoc, whereas really this *applies*\r
370 a format to tag.  Maybe notmuch-tag-format-tag?  This is really the\r
371 single tag equivalent of notmuch-tag-format-tags, so it would make sense\r
372 for the names to parallel each other.\r
373 \r
374 > +  (let ((formats (assoc tag notmuch-tag-formats)))\r
375 > +    (cond\r
376 > +     ((null formats)         ;; - Tag not in `notmuch-tag-formats',\r
377 > +      tag)                   ;; the format is then the tag itself.\r
378 > +     ((null (cdr formats))   ;; - Tag was deliberately hidden,\r
379 > +      nil)                   ;; no format must be returned\r
380 > +     (t                              ;; - Tag was found and has formats,\r
381 > +      (let ((tag tag))               ;; we must apply all the formats.\r
382 > +     (dolist (format (cdr formats) tag)\r
383 > +       (setq tag (eval format))))))))\r
384 > +\r
385 > +(defun notmuch-tag-list-get-format (tags)\r
386 \r
387 Is there a reason to separate this in to a separate function, rather\r
388 than inlining it into notmuch-tag-format-tags?  The reason I wonder is\r
389 that the function name doesn't seem very informative, which suggests\r
390 that it doesn't really exist as a separate concept outside of\r
391 notmuch-tag-format-tags.\r
392 \r
393 > +  (mapconcat #'identity\r
394 > +          ;; nil indicated that the tag was deliberately hidden\r
395 > +          (delq nil (mapcar #'notmuch-tag-get-format tags))\r
396 > +          " "))\r
397 > +\r
398 > +(defun notmuch-tag-format-tags (tags)\r
399 > +  "Return a string representing TAGS with their formats."\r
400 > +  (notmuch-combine-face-text-property-string\r
401 > +   (notmuch-tag-list-get-format tags)\r
402 > +   'notmuch-tag-face\r
403 > +   t))\r
404 > +\r
405 >  (defcustom notmuch-before-tag-hook nil\r
406 >    "Hooks that are run before tags of a message are modified.\r
407 >=20=20\r
408 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
409 > index c98a4fe..e58c51d 100644\r
410 > --- a/emacs/notmuch.el\r
411 > +++ b/emacs/notmuch.el\r
412 > @@ -797,9 +797,8 @@ non-authors is found, assume that all of the authors =\r
413 match."\r
414 >      (notmuch-search-insert-authors format-string (plist-get result :auth=\r
415 ors)))\r
416 >=20=20\r
417 >     ((string-equal field "tags")\r
418 > -    (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))\r
419 > -      (insert (propertize (format format-string tags-str)\r
420 > -                       'face 'notmuch-tag-face))))))\r
421 > +    (let ((tags (plist-get result :tags)))\r
422 > +      (insert (format format-string (notmuch-tag-format-tags tags)))))))\r
423 >=20=20\r
424 >  (defun notmuch-search-show-result (result &optional pos)\r
425 >    "Insert RESULT at POS or the end of the buffer if POS is null."\r
426 > --=20\r
427 > 1.7.10.4\r
428 >\r
429 > _______________________________________________\r
430 > notmuch mailing list\r
431 > notmuch@notmuchmail.org\r
432 > http://notmuchmail.org/mailman/listinfo/notmuch\r