X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=5695b684029c9fad127d93be65773d9783befaae;hb=2c202df6bacab3a05b42d91f1e283b9010a08688;hp=8b6cd51017947c27ff90dbff44bde1fbdac98add;hpb=30f1c43efe32c83193a6b9ae1f31ab2667e4195d;p=notmuch diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 8b6cd510..5695b684 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -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,10 +862,16 @@ 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) (setq notmuch-tree-open-target open-target) + ;; Set the default value for `notmuch-show-process-crypto' in this + ;; buffer. Although we don't use this some of the functions we call + ;; (such as reply) do. It is a buffer local variable so setting it + ;; will not affect genuine show buffers. + (setq notmuch-show-process-crypto notmuch-crypto-process-mime) (erase-buffer) (goto-char (point-min))