* [PATCH] emacs search: stash query
@ 2015-06-12 8:15 Mark Walters
2015-06-13 6:36 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Mark Walters @ 2015-06-12 8:15 UTC (permalink / raw)
To: notmuch
Add keybinding c q to stash the current query in search mode.
---
We could add something similar in show or tree mode but the query is
then partly notmuch generated (in particular the choice of thread) so
it is not so useful there.
Best wishes
Mark
emacs/notmuch.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f03c2f9..6564816 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -181,6 +181,7 @@ (defvar notmuch-search-mode-map
(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 @@ (defun notmuch-search-stash-thread-id ()
(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)
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] emacs search: stash query
2015-06-12 8:15 [PATCH] emacs search: stash query Mark Walters
@ 2015-06-13 6:36 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2015-06-13 6:36 UTC (permalink / raw)
To: Mark Walters, notmuch
Mark Walters <markwalters1009@gmail.com> writes:
> Add keybinding c q to stash the current query in search mode.
> ---
>
pushed. If you're going to complain about the keybinding, please do it
soon before everyone else gets used to it.
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-13 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 8:15 [PATCH] emacs search: stash query Mark Walters
2015-06-13 6:36 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).