From 17bfc25bb35dc8d1d6686298c6f842a3ce450940 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Sun, 21 Feb 2021 15:19:02 +0000 Subject: [PATCH] emacs: Allow functions in notmuch-{tree,unthreaded}-result-format If the car of an element in notmuch-tree-result-format or notmuch-unthreaded-result-format is a function, insert the result of calling the function into the buffer. --- emacs/notmuch-tree.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index b48a132d..b3f1183d 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -885,6 +885,9 @@ unchanged ADDRESS if parsing fails." ((listp field) (format format-string (notmuch-tree-format-field-list field msg))) + ((functionp field) + (funcall field format-string msg)) + ((string-equal field "date") (let ((face (if match 'notmuch-tree-match-date-face -- 2.43.0