X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=182235e79525be3723877d496ed717018af4f7f3;hb=727fcd18c6a3897622582e71a2d71081e3ae40ea;hp=e859cc244f8f46f501b750746416ec65f64be4f1;hpb=f92342cb76fa3e1fa2f1c2e727f8ddf1a5c21b7d;p=notmuch diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index e859cc24..182235e7 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -234,7 +234,7 @@ FUNC." ;; Override because we want to close message pane first. (define-key map [remap notmuch-help] (notmuch-tree-close-message-pane-and #'notmuch-help)) ;; Override because we first close message pane and then close tree buffer. - (define-key map [remap notmuch-kill-this-buffer] 'notmuch-tree-quit) + (define-key map [remap notmuch-bury-or-kill-this-buffer] 'notmuch-tree-quit) ;; Override because we close message pane after the search query is entered. (define-key map [remap notmuch-search] 'notmuch-tree-to-search) ;; Override because we want to close message pane first. @@ -413,6 +413,13 @@ Does NOT change the database." (ignore-errors (delete-window notmuch-tree-message-window))))) +(defun notmuch-tree-command-hook () + (when (eq major-mode 'notmuch-tree-mode) + ;; We just run the notmuch-show-command-hook on the message pane. + (when (buffer-live-p notmuch-tree-message-buffer) + (with-current-buffer notmuch-tree-message-buffer + (notmuch-show-command-hook))))) + (defun notmuch-tree-show-message-in () "Show the current message (in split-pane)." (interactive) @@ -855,6 +862,7 @@ This is is a helper function for notmuch-tree. The arguments are the same as for the function notmuch-tree." (interactive) (notmuch-tree-mode) + (add-hook 'post-command-hook #'notmuch-tree-command-hook t t) (setq notmuch-tree-basic-query basic-query) (setq notmuch-tree-query-context query-context) (setq notmuch-tree-target-msg target)