Re: [PATCH 2/2] emacs: possibility to customize the rendering of tags
authorAustin Clements <amdragon@MIT.EDU>
Sat, 16 Mar 2013 04:10:05 +0000 (00:10 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:00 +0000 (09:54 -0800)
2e/6d46232f4f4bbe26d72d256acae61bee64feee [new file with mode: 0644]

diff --git a/2e/6d46232f4f4bbe26d72d256acae61bee64feee b/2e/6d46232f4f4bbe26d72d256acae61bee64feee
new file mode 100644 (file)
index 0000000..6ba91d2
--- /dev/null
@@ -0,0 +1,432 @@
+Return-Path: <amdragon@mit.edu>\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 1A15C431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 15 Mar 2013 21:10:14 -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 g2ONmVIjUJDM for <notmuch@notmuchmail.org>;\r
+       Fri, 15 Mar 2013 21:10:12 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 73063431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 15 Mar 2013 21:10:12 -0700 (PDT)\r
+X-AuditID: 12074424-b7f936d0000008eb-f8-5143f0a28265\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 8A.52.02283.2A0F3415; Sat, 16 Mar 2013 00:10:10 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r2G4A85c027653; \r
+       Sat, 16 Mar 2013 00:10:09 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r2G4A6P9018399\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Sat, 16 Mar 2013 00:10:07 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1UGiRZ-0001Y7-Nx; Sat, 16 Mar 2013 00:10:05 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Damien Cassou <damien.cassou@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] emacs: possibility to customize the rendering of tags\r
+In-Reply-To: <1360162435-29506-3-git-send-email-damien.cassou@gmail.com>\r
+References: <1360162435-29506-1-git-send-email-damien.cassou@gmail.com>\r
+       <1360162435-29506-3-git-send-email-damien.cassou@gmail.com>\r
+User-Agent: Notmuch/0.15+6~g7d4cb73 (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Sat, 16 Mar 2013 00:10:05 -0400\r
+Message-ID: <87sj3w56jm.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IR4hRV1l30wTnQYHkbv8Wuu1uZLK7fnMns\r
+       wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGXsPLWXraAxs2L2qTamBsYPQV2MnBwSAiYS\r
+       p6ffZYWwxSQu3FvP1sXIxSEksI9RYsOif4wQzkZGiX/HF0I5p5kkFnXNZYdwljBKvHt0lwWk\r
+       n01AQ2Lb/uWMILaIgIvEzFPdYHOFBfwkHv44yQRicwp4SBy83gtmCwk0M0o8eOcGYosKxEpM\r
+       Pz0BaA4HB4uAqkTLQheQMC/QeYe3rWSHsAUlTs58AraKWUBd4s+8S8wQtrbEsoWvmScwCs5C\r
+       UjYLSdksJGULGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zrr5WaW6KWmlG5iBIUwu4vKDsbm\r
+       Q0qHGAU4GJV4eCvtnAOFWBPLiitzDzFKcjApifJa3gUK8SXlp1RmJBZnxBeV5qQWH2KU4GBW\r
+       EuF9pw+U401JrKxKLcqHSUlzsCiJ815PuekvJJCeWJKanZpakFoEk5Xh4FCS4JV/D9QoWJSa\r
+       nlqRlplTgpBm4uAEGc4DNDwFpIa3uCAxtzgzHSJ/itGYY8G1Ry8YOZa8BpJCLHn5ealS4ryf\r
+       3gGVCoCUZpTmwU2DpaFXjOJAzwnzWoAM5AGmMLh5r4BWMQGt2nfFCWRVSSJCSqqBcYPMV6aj\r
+       udkJabNK1ykdq++9Lx/LeG9WeaHTz32Bvh8zq2+yPrqUXhS+9I+EbVBmwzIhm+DAxtMbb0R/\r
+       e7qyoO2pxTKzjn9PLtzUiFec5yZyum33br0MppMLMl+WmT/YsGVD444s/p6sYKFvya5dNvId\r
+       x+fY2N5dLPMyeQsDZ3iJxLeSOqUrSizFGYmGWsxFxYkAhMcH2x4DAAA=\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: Sat, 16 Mar 2013 04:10:14 -0000\r
+\r
+(Decided I needed a brief break from working continuously.  I haven't\r
+been following the mailing list at all, so I don't know if there's been\r
+additional context relevant to this patch series, but this at least\r
+appears to be the latest version.)\r
+\r
+This is looking really good.  Just a few tiny comments below.\r
+\r
+On Wed, 06 Feb 2013, Damien Cassou <damien.cassou@gmail.com> wrote:\r
+> This patch extracts the rendering of tags in notmuch-show to\r
+> the notmuch-tag file.\r
+>\r
+> This file introduces a `notmuch-tag-formats' variable that associates\r
+> each tag to a particular format. This variable can be customized\r
+> thanks to the work of Austin Clements. For example,\r
+>\r
+>   '(("unread" (propertize tag 'face '(:foreground "red")))\r
+>     ("flagged" (notmuch-tag-format-image tag "star.svg")))\r
+>\r
+> associates a red foreground to the "unread" tag and a star picture to\r
+> the "flagged" tag.\r
+>\r
+> Signed-off-by: Damien Cassou <damien.cassou@gmail.com>\r
+> ---\r
+>  emacs/notmuch-show.el |    6 +-\r
+>  emacs/notmuch-tag.el  |  221 +++++++++++++++++++++++++++++++++++++++++++=\r
++++++-\r
+>  emacs/notmuch.el      |    5 +-\r
+>  3 files changed, 224 insertions(+), 8 deletions(-)\r
+>\r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+> index 1864dd1..bb4bd92 100644\r
+> --- a/emacs/notmuch-show.el\r
+> +++ b/emacs/notmuch-show.el\r
+> @@ -362,8 +362,7 @@ operation on the contents of the current buffer."\r
+>      (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)\r
+>      (let ((inhibit-read-only t))\r
+>        (replace-match (concat "("\r
+> -                             (propertize (mapconcat 'identity tags " ")\r
+> -                                         'face 'notmuch-tag-face)\r
+> +                             (notmuch-tag-format-tags tags)\r
+>                               ")"))))))\r
+>=20=20\r
+>  (defun notmuch-clean-address (address)\r
+> @@ -441,8 +440,7 @@ message at DEPTH in the current thread."\r
+>          " ("\r
+>          date\r
+>          ") ("\r
+> -        (propertize (mapconcat 'identity tags " ")\r
+> -                    'face 'notmuch-tag-face)\r
+> +        (notmuch-tag-format-tags tags)\r
+>          ")\n")\r
+>      (overlay-put (make-overlay start (point)) 'face 'notmuch-message-sum=\r
+mary-face)))\r
+>=20=20\r
+> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
+> index 4fce3a9..2a64d48 100644\r
+> --- a/emacs/notmuch-tag.el\r
+> +++ b/emacs/notmuch-tag.el\r
+> @@ -1,5 +1,6 @@\r
+>  ;; notmuch-tag.el --- tag messages within emacs\r
+>  ;;\r
+> +;; Copyright =C2=A9 Damien Cassou\r
+>  ;; Copyright =C2=A9 Carl Worth\r
+>  ;;\r
+>  ;; This file is part of Notmuch.\r
+> @@ -18,11 +19,229 @@\r
+>  ;; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.\r
+>  ;;\r
+>  ;; Authors: Carl Worth <cworth@cworth.org>\r
+> +;;          Damien Cassou <damien.cassou@gmail.com>\r
+> +;;\r
+> +;;; Code:\r
+> +;;\r
+>=20=20\r
+> -(eval-when-compile (require 'cl))\r
+> +(require 'cl)\r
+>  (require 'crm)\r
+>  (require 'notmuch-lib)\r
+>=20=20\r
+> +(defcustom notmuch-tag-formats\r
+> +  '(("unread" (propertize tag 'face '(:foreground "red")))\r
+> +    ("flagged" (notmuch-tag-format-image-data tag (notmuch-tag-star-icon=\r
+))))\r
+> +  "Custom formats for individual tags.\r
+> +\r
+> +This gives a list that maps from tag names to lists of formatting\r
+> +expressions.  The car of each element gives a tag name and the\r
+> +cdr gives a list of Elisp expressions that modify the tag.  If\r
+> +the list is empty, the tag will simply be hidden.  Otherwise,\r
+> +each expression will be evaluated in order: for the first\r
+> +expression, the variable `tag' will be bound to the tag name; for\r
+> +each later expression, the variable `tag' will be bound to the\r
+> +result of the previous expression.  In this way, each expression\r
+> +can build on the formatting performed by the previous expression.\r
+> +The result of the last expression will displayed in place of the\r
+> +tag.\r
+> +\r
+> +For example, to replace a tag with another string, simply use\r
+> +that string as a formatting expression.  To change the foreground\r
+> +of a tag to red, use the expression\r
+> +  (propertize tag 'face '(:foreground \"red\"))\r
+> +\r
+> +See also `notmuch-tag-format-image', which can help replace tags\r
+> +with images."\r
+> +\r
+> +  :group 'notmuch-search\r
+> +  :group 'notmuch-show\r
+> +  :type '(alist :key-type (string :tag "Tag")\r
+> +            :extra-offset -3\r
+> +            :value-type\r
+> +            (radio :format "%v"\r
+> +                   (const :tag "Hidden" nil)\r
+> +                   (set :tag "Modified"\r
+> +                        (string :tag "Display as")\r
+> +                        (list :tag "Face" :extra-offset -4\r
+> +                              (const :format "" :inline t\r
+> +                                     (propertize tag 'face))\r
+> +                              (list :format "%v"\r
+> +                                    (const :format "" quote)\r
+> +                                    custom-face-edit))\r
+> +                        (list :format "%v" :extra-offset -4\r
+> +                              (const :format "" :inline t\r
+> +                                     (notmuch-tag-format-image-data tag))\r
+> +                              (choice :tag "Image"\r
+> +                                      (const :tag "Star"\r
+> +                                             (notmuch-tag-star-icon))\r
+> +                                      (const :tag "Empty star"\r
+> +                                             (notmuch-tag-star-empty-icon))\r
+> +                                      (const :tag "Tag"\r
+> +                                             (notmuch-tag-tag-icon))\r
+> +                                      (string :tag "Custom")))\r
+> +                        (sexp :tag "Custom")))))\r
+> +\r
+> +(defun notmuch-tag-format-image-data (tag data)\r
+> +  "Replace TAG with image DATA, if available.\r
+> +\r
+> +This function returns a propertized string that will display image\r
+> +DATA in place of TAG.This is designed for use in\r
+> +`notmuch-tag-formats'.\r
+> +\r
+> +DATA is the content of an SVG picture (e.g., as returned by\r
+> +`notmuch-tag-star-icon')."\r
+> +  (propertize tag 'display\r
+> +          `(image :type svg\r
+> +                  :data ,data\r
+> +                  :ascent center\r
+> +                  :mask heuristic)))\r
+> +\r
+> +(defun notmuch-tag-star-icon ()\r
+> +  "Return SVG data representing a star icon.\r
+> +This can be used with `notmuch-tag-format-image-data'."\r
+> +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
+> +<svg\r
+> +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
+> +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
+> +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
+> +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
+> +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
+> +   version=3D\"1.1\"\r
+> +   width=3D\"16\"\r
+> +   height=3D\"16\"\r
+> +   id=3D\"svg2\">\r
+> +  <defs\r
+> +     id=3D\"defs4\" />\r
+> +  <metadata\r
+> +     id=3D\"metadata7\">\r
+> +    <rdf:RDF>\r
+> +      <cc:Work\r
+> +         rdf:about=3D\"\">\r
+> +        <dc:format>image/svg+xml</dc:format>\r
+> +        <dc:type\r
+> +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
+> +        <dc:title></dc:title>\r
+> +      </cc:Work>\r
+> +    </rdf:RDF>\r
+> +  </metadata>\r
+> +  <g\r
+> +     transform=3D\"translate(-242.81601,-315.59635)\"\r
+> +     id=3D\"layer1\">\r
+> +    <path\r
+> +       d=3D\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447=\r
+ 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7=\r
+.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"\r
+> +       transform=3D\"matrix(0.2484147,-0.02623394,0.02623394,0.2484147,1=\r
+74.63605,255.37691)\"\r
+> +       id=3D\"path2985\"\r
+> +       style=3D\"fill:#ffff00;fill-rule:evenodd;stroke:#000000;stroke-wi=\r
+dth:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\" />\r
+> +  </g>\r
+> +</svg>")\r
+\r
+You could simplify these SVGs much further.  You can remove the defs and\r
+metadata blocks, and then remove all of the xmlns:* properties (keeping\r
+just the root namespace).  You can also remove the id properties.  I\r
+think you can even remove the g, leaving only the path, since it's only\r
+a translate and I'm pretty sure the origin doesn't matter.\r
+\r
+> +\r
+> +(defun notmuch-tag-star-empty-icon ()\r
+> +  "Return SVG data representing an empty star icon.\r
+> +This can be used with `notmuch-tag-format-image-data'."\r
+> +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
+> +<!-- Created with Inkscape (http://www.inkscape.org/) -->\r
+> +\r
+> +<svg\r
+> +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
+> +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
+> +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
+> +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
+> +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
+> +   version=3D\"1.1\"\r
+> +   width=3D\"16\"\r
+> +   height=3D\"16\"\r
+> +   id=3D\"svg2\">\r
+> +  <defs\r
+> +     id=3D\"defs4\" />\r
+> +  <metadata\r
+> +     id=3D\"metadata7\">\r
+> +    <rdf:RDF>\r
+> +      <cc:Work\r
+> +         rdf:about=3D\"\">\r
+> +        <dc:format>image/svg+xml</dc:format>\r
+> +        <dc:type\r
+> +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
+> +        <dc:title></dc:title>\r
+> +      </cc:Work>\r
+> +    </rdf:RDF>\r
+> +  </metadata>\r
+> +  <g\r
+> +     transform=3D\"translate(-242.81601,-315.59635)\"\r
+> +     id=3D\"layer1\">\r
+> +    <path\r
+> +       d=3D\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447=\r
+ 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7=\r
+.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"\r
+> +       transform=3D\"matrix(0.2484147,-0.02623394,0.02623394,0.2484147,1=\r
+74.63605,255.37691)\"\r
+> +       id=3D\"path2985\"\r
+> +       style=3D\"fill:#d6d6d1;fill-opacity:1;fill-rule:evenodd;stroke:#0=\r
+00000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opa=\r
+city:1\" />\r
+> +  </g>\r
+> +</svg>")\r
+> +\r
+> +(defun notmuch-tag-tag-icon ()\r
+> +  "Return SVG data representing a tag icon.\r
+> +This can be used with `notmuch-tag-format-image-data'."\r
+> +  "<?xml version=3D\"1.0\" encoding=3D\"UTF-8\" standalone=3D\"no\"?>\r
+> +<!-- Created with Inkscape (http://www.inkscape.org/) -->\r
+> +\r
+> +<svg\r
+> +   xmlns:dc=3D\"http://purl.org/dc/elements/1.1/\"\r
+> +   xmlns:cc=3D\"http://creativecommons.org/ns#\"\r
+> +   xmlns:rdf=3D\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r
+> +   xmlns:svg=3D\"http://www.w3.org/2000/svg\"\r
+> +   xmlns=3D\"http://www.w3.org/2000/svg\"\r
+> +   version=3D\"1.1\"\r
+> +   width=3D\"16\"\r
+> +   height=3D\"16\"\r
+> +   id=3D\"svg3805\">\r
+> +  <defs\r
+> +     id=3D\"defs3807\" />\r
+> +  <metadata\r
+> +     id=3D\"metadata3810\">\r
+> +    <rdf:RDF>\r
+> +      <cc:Work\r
+> +         rdf:about=3D\"\">\r
+> +        <dc:format>image/svg+xml</dc:format>\r
+> +        <dc:type\r
+> +           rdf:resource=3D\"http://purl.org/dc/dcmitype/StillImage\" />\r
+> +        <dc:title></dc:title>\r
+> +      </cc:Work>\r
+> +    </rdf:RDF>\r
+> +  </metadata>\r
+> +  <g\r
+> +     transform=3D\"translate(0,-1036.3622)\"\r
+> +     id=3D\"layer1\">\r
+> +    <path\r
+> +       d=3D\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700=\r
+893,3.616 -12.50000043,0 z\"\r
+> +       id=3D\"rect4321\"\r
+> +       style=3D\"fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#0=\r
+00000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-mi=\r
+terlimit:4;stroke-opacity:1\" />\r
+> +  </g>\r
+> +</svg>")\r
+> +\r
+> +(defun notmuch-tag-get-format (tag)\r
+> +  "Return the format for TAG in `notmuch-tag-formats'."\r
+\r
+Hmm.  I read this as simply returning the format from\r
+notmuch-tag-formats, like just the assoc, whereas really this *applies*\r
+a format to tag.  Maybe notmuch-tag-format-tag?  This is really the\r
+single tag equivalent of notmuch-tag-format-tags, so it would make sense\r
+for the names to parallel each other.\r
+\r
+> +  (let ((formats (assoc tag notmuch-tag-formats)))\r
+> +    (cond\r
+> +     ((null formats)                ;; - Tag not in `notmuch-tag-formats',\r
+> +      tag)                  ;; the format is then the tag itself.\r
+> +     ((null (cdr formats))  ;; - Tag was deliberately hidden,\r
+> +      nil)                  ;; no format must be returned\r
+> +     (t                             ;; - Tag was found and has formats,\r
+> +      (let ((tag tag))              ;; we must apply all the formats.\r
+> +    (dolist (format (cdr formats) tag)\r
+> +      (setq tag (eval format))))))))\r
+> +\r
+> +(defun notmuch-tag-list-get-format (tags)\r
+\r
+Is there a reason to separate this in to a separate function, rather\r
+than inlining it into notmuch-tag-format-tags?  The reason I wonder is\r
+that the function name doesn't seem very informative, which suggests\r
+that it doesn't really exist as a separate concept outside of\r
+notmuch-tag-format-tags.\r
+\r
+> +  (mapconcat #'identity\r
+> +         ;; nil indicated that the tag was deliberately hidden\r
+> +         (delq nil (mapcar #'notmuch-tag-get-format tags))\r
+> +         " "))\r
+> +\r
+> +(defun notmuch-tag-format-tags (tags)\r
+> +  "Return a string representing TAGS with their formats."\r
+> +  (notmuch-combine-face-text-property-string\r
+> +   (notmuch-tag-list-get-format tags)\r
+> +   'notmuch-tag-face\r
+> +   t))\r
+> +\r
+>  (defcustom notmuch-before-tag-hook nil\r
+>    "Hooks that are run before tags of a message are modified.\r
+>=20=20\r
+> diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+> index c98a4fe..e58c51d 100644\r
+> --- a/emacs/notmuch.el\r
+> +++ b/emacs/notmuch.el\r
+> @@ -797,9 +797,8 @@ non-authors is found, assume that all of the authors =\r
+match."\r
+>      (notmuch-search-insert-authors format-string (plist-get result :auth=\r
+ors)))\r
+>=20=20\r
+>     ((string-equal field "tags")\r
+> -    (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))\r
+> -      (insert (propertize (format format-string tags-str)\r
+> -                      'face 'notmuch-tag-face))))))\r
+> +    (let ((tags (plist-get result :tags)))\r
+> +      (insert (format format-string (notmuch-tag-format-tags tags)))))))\r
+>=20=20\r
+>  (defun notmuch-search-show-result (result &optional pos)\r
+>    "Insert RESULT at POS or the end of the buffer if POS is null."\r
+> --=20\r
+> 1.7.10.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r