aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Walters <markwalters1009@gmail.com>2015-06-12 09:15:32 +0100
committerDavid Bremner <david@tethera.net>2015-06-13 08:16:56 +0200
commit4e799034492ca28d65385afc94a35461fe25b426 (patch)
tree2eb17accb01435da74017102690f3bc5d298a333
parentd038b9320949c79503fe4b76870aaabf279405ab (diff)
emacs search: stash query
Add keybinding c q to stash the current query in search mode.
-rw-r--r--emacs/notmuch.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f03c2f90..6564816f 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -181,6 +181,7 @@ there will be called at other points of notmuch execution."
(defvar notmuch-search-stash-map
(let ((map (make-sparse-keymap)))
(define-key map "i" 'notmuch-search-stash-thread-id)
+ (define-key map "q" 'notmuch-stash-query)
(define-key map "?" 'notmuch-subkeymap-help)
map)
"Submap for stash commands")
@@ -191,6 +192,11 @@ there will be called at other points of notmuch execution."
(interactive)
(notmuch-common-do-stash (notmuch-search-find-thread-id)))
+(defun notmuch-stash-query ()
+ "Copy current query to kill-ring."
+ (interactive)
+ (notmuch-common-do-stash (notmuch-search-get-query)))
+
(defvar notmuch-search-query-string)
(defvar notmuch-search-target-thread)
(defvar notmuch-search-target-line)