X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=f00273a959eaf35cfac60c91127b000244cf2716;hb=3d15ed9290013e31a743c20139da16c8ccaa2bb7;hp=9e8b9c09d699f706663e8a5a5ba818f9b1050520;hpb=a7964c86d12558396cda0f297ebf8dcc602bab61;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 9e8b9c09..f00273a9 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -44,6 +44,8 @@ (declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle)) (declare-function notmuch-count-attachments "notmuch" (mm-handle)) (declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp)) +(declare-function notmuch-tree "notmuch-tree" + (&optional query query-context target buffer-name open-target)) (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") "Headers that should be shown in a message, in this order. @@ -1247,6 +1249,7 @@ reset based on the original query." (defvar notmuch-show-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map notmuch-common-keymap) + (define-key map "Z" 'notmuch-tree-from-show-current-query) (define-key map (kbd "") 'widget-backward) (define-key map (kbd "M-TAB") 'notmuch-show-previous-button) (define-key map (kbd "") 'notmuch-show-previous-button) @@ -1323,6 +1326,13 @@ All currently available key bindings: (setq buffer-read-only t truncate-lines t)) +(defun notmuch-tree-from-show-current-query () + "Call notmuch tree with the current query" + (interactive) + (notmuch-tree notmuch-show-thread-id + notmuch-show-query-context + (notmuch-show-get-message-id))) + (defun notmuch-show-move-to-message-top () (goto-char (notmuch-show-message-top)))