diff options
author | Damien Cassou <damien.cassou@gmail.com> | 2013-03-23 12:29:54 +0100 |
---|---|---|
committer | David Bremner <bremner@unb.ca> | 2013-03-25 11:38:49 -0400 |
commit | b714a808a692a99c1b936be43186a40ab251aeca (patch) | |
tree | 03384fbba9a327bc3bf3e390ded5e69bc062d14d /emacs/notmuch.el | |
parent | 4ea80dd2a105ae5d57742b7f44951d1826463fa9 (diff) |
emacs: possibility to customize the rendering of tags
This patch extracts the rendering of tags in notmuch-show to
the notmuch-tag file.
This file introduces a `notmuch-tag-formats' variable that associates
each tag to a particular format. This variable can be customized
thanks to the work of Austin Clements. For example,
'(("unread" (propertize tag 'face '(:foreground "red")))
("flagged" (notmuch-tag-format-image tag "star.svg")))
associates a red foreground to the "unread" tag and a star picture to
the "flagged" tag.
Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r-- | emacs/notmuch.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c98a4feb..e58c51df 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -797,9 +797,8 @@ non-authors is found, assume that all of the authors match." (notmuch-search-insert-authors format-string (plist-get result :authors))) ((string-equal field "tags") - (let ((tags-str (mapconcat 'identity (plist-get result :tags) " "))) - (insert (propertize (format format-string tags-str) - 'face 'notmuch-tag-face)))))) + (let ((tags (plist-get result :tags))) + (insert (format format-string (notmuch-tag-format-tags tags))))))) (defun notmuch-search-show-result (result &optional pos) "Insert RESULT at POS or the end of the buffer if POS is null." |