]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Allow functions in notmuch-{tree,unthreaded}-result-format
authorDavid Edmondson <dme@dme.org>
Sun, 21 Feb 2021 15:19:02 +0000 (15:19 +0000)
committerDavid Bremner <david@tethera.net>
Thu, 9 Sep 2021 02:00:45 +0000 (23:00 -0300)
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

index b48a132dd5aa9e1af74368cb6949bb8d83258fec..b3f1183da4b50fc531e3813be8e9420c2bbc621f 100644 (file)
@@ -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