diff options
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/jao-notmuch.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 0d5ff53..d7e27b6 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -354,18 +354,21 @@ (interactive "P") (jao-notmuch-tree--next t t exit)) +;;; tree setup overall function -;;; Updating the tree window after insertion - -(defun jao-notmuch--tree-sentinel (proc &rest _) +(defun jao-notmuch-tree--sentinel (proc) (when (eq (process-status proc) 'exit) + (let ((inhibit-read-only t)) + (save-excursion + (goto-char (point-max)) + (when (re-search-backward "^End of search results." nil t) + (let ((kill-whole-line t)) (kill-line))))) (jao-notmuch-tree-hide-others))) (defun jao-notmuch-tree-setup (&optional prefix) "Set up display of trees, with PREFIX key for outline commands." - (jao-notmuch-tree-outline-setup prefix) - (advice-add 'notmuch-tree-process-sentinel :after #'jao-notmuch--tree-sentinel)) - + (add-hook 'notmuch-tree-process-exit-functions #'jao-notmuch-tree--sentinel) + (jao-notmuch-tree-outline-setup prefix)) ;;; tagging |