aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Walters <markwalters1009@gmail.com>2015-10-14 09:38:23 +0100
committerDavid Bremner <david@tethera.net>2015-10-21 09:14:07 -0300
commitf9d2ccf67b0534637c128fd088957604d0435e7c (patch)
treeaf5b57e8b95ad0a3639769b91577f706ec57ecf0
parent391d9f94204234d6ef3dd701d69bfdf92dbad8f0 (diff)
emacs: tree: bind S to run current query in search mode
-rw-r--r--emacs/notmuch-tree.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 5695b684..384cb76b 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -240,6 +240,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 +404,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)))