diff options
author | Mark Walters <markwalters1009@gmail.com> | 2014-06-23 22:06:46 +0100 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-07-15 20:32:49 -0300 |
commit | f47eeac0b0186c3559eb559c4f0bee0e1fac1961 (patch) | |
tree | f19c3ee157db852d9252e1ab8d5e2625ee28de14 /emacs/notmuch-tree.el | |
parent | 7f2bbe93a557c22277b46ad6048742222d80ed68 (diff) |
emacs: set default in notmuch-read-query
This adds the current query as a "default value" to
notmuch-read-qeury. The default value is available via a down-arrow as
opposed to history which is available from the up arrow.
Note if a user presses return in the minibuffer this value is not
returned.
The implementation is simple but notmuch-read-query could be called
via notmuch-search/notmuch-tree etc from any buffer so it makes sense
to put the decision of how to extract the current query in
notmuch-read-query rather than in each of the callers.
Diffstat (limited to 'emacs/notmuch-tree.el')
-rw-r--r-- | emacs/notmuch-tree.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 7d5f4750..e9249da1 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -897,6 +897,15 @@ the same as for the function notmuch-tree." (set-process-filter proc 'notmuch-tree-process-filter) (set-process-query-on-exit-flag proc nil)))) +(defun notmuch-tree-get-query () + "Return the current query in this tree buffer" + (if notmuch-tree-query-context + (concat notmuch-tree-basic-query + " and (" + notmuch-tree-query-context + ")") + notmuch-tree-basic-query)) + (defun notmuch-tree (&optional query query-context target buffer-name open-target) "Display threads matching QUERY in Tree View. |