aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <amdragon@MIT.EDU>2012-07-21 13:37:10 -0400
committerDavid Bremner <bremner@debian.org>2012-07-24 09:23:13 -0300
commit90e741ef81668d9b7db62b57e9a0c88877e2631e (patch)
treecbdf6d69f453bc9d29a5f6eb0b4de3a4872ac43f
parente94b45112ec7262224fdaae03bae75eb47cdece0 (diff)
emacs: Allow custom tags formatting
Previously we ignored any notmuch-search-result-format customizations for tag formatting because we needed to be able to parse back in the result line and update the tags in place. We no longer do either of these things, so we can allow customization of this format. (Coincidentally, previously we still allowed too much customization of the tags format, since moving it earlier on the line or removing it from the line would interfere with the tagging mechanism. There is now no problem with doing such things.)
-rw-r--r--emacs/notmuch.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 7180b9d..d092528 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -775,11 +775,9 @@ 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")
- ;; Ignore format-string here because notmuch-search-set-tags
- ;; depends on the format of this
- (insert (concat "(" (propertize
- (mapconcat 'identity (plist-get result :tags) " ")
- 'font-lock-face 'notmuch-tag-face) ")")))))
+ (let ((tags-str (mapconcat 'identity (plist-get result :tags) " ")))
+ (insert (propertize (format format-string tags-str)
+ 'face 'notmuch-tag-face))))))
(defun notmuch-search-show-result (result &optional pos)
"Insert RESULT at POS or the end of the buffer if POS is null."