aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-show.el
diff options
context:
space:
mode:
authorGravatar Damien Cassou <damien.cassou@gmail.com>2013-03-23 12:29:54 +0100
committerGravatar David Bremner <bremner@unb.ca>2013-03-25 11:38:49 -0400
commitb714a808a692a99c1b936be43186a40ab251aeca (patch)
tree03384fbba9a327bc3bf3e390ded5e69bc062d14d /emacs/notmuch-show.el
parent4ea80dd2a105ae5d57742b7f44951d1826463fa9 (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-show.el')
-rw-r--r--emacs/notmuch-show.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index acaef8ef..a4d2c128 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -362,8 +362,7 @@ operation on the contents of the current buffer."
(if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t)
(let ((inhibit-read-only t))
(replace-match (concat "("
- (propertize (mapconcat 'identity tags " ")
- 'face 'notmuch-tag-face)
+ (notmuch-tag-format-tags tags)
")"))))))
(defun notmuch-clean-address (address)
@@ -441,8 +440,7 @@ message at DEPTH in the current thread."
" ("
date
") ("
- (propertize (mapconcat 'identity tags " ")
- 'face 'notmuch-tag-face)
+ (notmuch-tag-format-tags tags)
")\n")
(overlay-put (make-overlay start (point)) 'face 'notmuch-message-summary-face)))