X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-tree.el;h=52313199c50f039192b81500c37236d795afb9c8;hb=17341ec798b4cb2fe192824bcf8b7e78236e4121;hp=182235e79525be3723877d496ed717018af4f7f3;hpb=5e375688418bd35c5b2de71fb69035332ba5aeab;p=notmuch
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 182235e7..52313199 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -1,4 +1,4 @@
-;; notmuch-tree.el --- displaying notmuch forests.
+;;; notmuch-tree.el --- displaying notmuch forests.
;;
;; Copyright © Carl Worth
;; Copyright © David Edmondson
@@ -17,11 +17,13 @@
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with Notmuch. If not, see .
+;; along with Notmuch. If not, see .
;;
;; Authors: David Edmondson
;; Mark Walters
+;;; Code:
+
(require 'mail-parse)
(require 'notmuch-lib)
@@ -240,6 +242,8 @@ FUNC."
;; Override because we want to close message pane first.
(define-key map [remap notmuch-mua-new-mail] (notmuch-tree-close-message-pane-and #'notmuch-mua-new-mail))
+ (define-key map "S" 'notmuch-search-from-tree-current-query)
+
;; these use notmuch-show functions directly
(define-key map "|" 'notmuch-show-pipe-message)
(define-key map "w" 'notmuch-show-save-attachments)
@@ -402,6 +406,12 @@ Does NOT change the database."
(notmuch-tree-close-message-window)
(notmuch-tree query)))
+(defun notmuch-search-from-tree-current-query ()
+ "Call notmuch search with the current query"
+ (interactive)
+ (notmuch-tree-close-message-window)
+ (notmuch-search (notmuch-tree-get-query)))
+
(defun notmuch-tree-message-window-kill-hook ()
"Close the message pane when exiting the show buffer."
(let ((buffer (current-buffer)))
@@ -867,6 +877,11 @@ the same as for the function notmuch-tree."
(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))
@@ -932,3 +947,5 @@ The arguments are:
;;
(provide 'notmuch-tree)
+
+;;; notmuch-tree.el ends here