X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;fp=emacs%2Fnotmuch-tree.el;h=b3c2c992486fd9e5ccd7f7510c138728f72f7c37;hp=7ceddee22fc49615952469d759595fcb4059e372;hb=3db892f43b4ac333a09dd05c8f230bf3f8d2b9e9;hpb=48d6b31485dfd3110b82fd8829063297284c78c0 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 7ceddee2..b3c2c992 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -45,9 +45,6 @@ (declare-function notmuch-search-previous-thread "notmuch" ()) (declare-function notmuch-tree-from-search-thread "notmuch" ()) -;; the following variable is defined in notmuch.el -(defvar notmuch-search-query-string) - ;; this variable distinguishes the unthreaded display from the normal tree display (defvar-local notmuch-tree-unthreaded nil "A buffer local copy of argument unthreaded to the function notmuch-tree.") @@ -399,6 +396,7 @@ then NAME behaves like CMD." (define-key map "V" 'notmuch-tree-view-raw-message) (define-key map "l" 'notmuch-tree-filter) (define-key map "t" 'notmuch-tree-filter-by-tag) + (define-key map "E" 'notmuch-tree-edit-search) ;; The main tree view bindings (define-key map (kbd "RET") 'notmuch-tree-show-message) @@ -1265,6 +1263,21 @@ search results and that are also tagged with the given TAG." nil notmuch-search-oldest-first))) +(defun notmuch-tree-edit-search (query) + "Edit the current search" + (interactive (list (read-from-minibuffer "Edit search: " + notmuch-tree-basic-query))) + (let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto))) + (notmuch-tree-close-message-window) + (notmuch-tree query + notmuch-tree-query-context + nil + nil + nil + notmuch-tree-unthreaded + nil + notmuch-search-oldest-first))) + ;;; _ (provide 'notmuch-tree)