X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=7ceddee22fc49615952469d759595fcb4059e372;hp=f63ac9a518ea43b6b0b62687f05b1f4a77f8cdf7;hb=684eeb65c7f63bb5dff457f38cc0cc9a2f56ff2b;hpb=76c3147613d0cb624573a5ba1ac7d0a5f81113bc diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index f63ac9a5..7ceddee2 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -1084,6 +1084,12 @@ Complete list of currently available key bindings: (setq buffer-read-only t) (setq truncate-lines t)) +(defvar notmuch-tree-process-exit-functions nil + "Functions called when the process inserting a tree of results finishes. + +Functions in this list are called with one argument, the process +object, and with the tree results buffer as the current buffer.") + (defun notmuch-tree-process-sentinel (proc _msg) "Add a message to let user know when \"notmuch tree\" exits." (let ((buffer (process-buffer proc)) @@ -1102,7 +1108,8 @@ Complete list of currently available key bindings: (insert "End of search results.") (unless (= exit-status 0) (insert (format " (process returned %d)" exit-status))) - (insert "\n"))))))))) + (insert "\n")))) + (run-hook-with-args 'notmuch-tree-process-exit-functions proc)))))) (defun notmuch-tree-process-filter (proc string) "Process and filter the output of \"notmuch show\" for tree view."