diff options
author | jao <jao@gnu.org> | 2021-09-01 02:01:19 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-09-01 02:01:58 +0100 |
commit | 6c6ecf30da3a97c859b693ec09eae1a2ae1502ba (patch) | |
tree | 4b6056753582a6a179c476298281d29f6d4c1912 /lib | |
parent | 08fabe62696da924e2bfe994e8cb1a1f4325c372 (diff) | |
download | elibs-6c6ecf30da3a97c859b693ec09eae1a2ae1502ba.tar.gz elibs-6c6ecf30da3a97c859b693ec09eae1a2ae1502ba.tar.bz2 |
jao-notmuch: arbitrary functions in notmuch-tree-result-format
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/jao-notmuch.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index b67c788..626eee8 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -196,8 +196,14 @@ (setq mm-text-html-renderer #'jao-w3m-gnus-html-renderer) - -;; Keeping track of unread messages in current tree view +;;;; Using arbitrary functions as "fields" in notmuch-tree-result-format + +(defun jao-notmuch--format-field (fun field fmt msg) + (if (symbolp field) (funcall field msg) (funcall fun field fmt msg))) + +(advice-add 'notmuch-tree-format-field :around #'jao-notmuch--format-field) + +;;;; Keeping track of unread messages in current tree view (defvar-local jao-notmuch--query-name nil) |