X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=f5f0324485f63296ad43403eb8ede17bbda952e8;hb=e02bb7e9fdbc96c66f32ce531509824f8afd4686;hp=773d12065db0f5c3697e9d54b485676bfc292429;hpb=f3cba19f882471a396a6b6175a709ccd1f6f34a0;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 773d1206..f5f03244 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -188,7 +188,9 @@ there will be called at other points of notmuch execution." (define-key map "-" 'notmuch-search-remove-tag) (define-key map "+" 'notmuch-search-add-tag) (define-key map (kbd "RET") 'notmuch-search-show-thread) + (define-key map (kbd "M-RET") 'notmuch-tree-from-search-thread) (define-key map "Z" 'notmuch-tree-from-search-current-query) + (define-key map "U" 'notmuch-unthreaded-from-search-current-query) map) "Keymap for \"notmuch search\" buffers.") (fset 'notmuch-search-mode-map notmuch-search-mode-map) @@ -522,6 +524,11 @@ thread." (interactive) (notmuch-tree notmuch-search-query-string)) +(defun notmuch-unthreaded-from-search-current-query () + "Call notmuch tree with the current query" + (interactive) + (notmuch-unthreaded notmuch-search-query-string)) + (defun notmuch-tree-from-search-thread () "Show the selected thread with notmuch-tree" (interactive) @@ -1070,6 +1077,12 @@ current search results AND that are tagged with the given tag." (list (notmuch-select-tag-with-completion "Filter by tag: " notmuch-search-query-string))) (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) +(defun notmuch-search-by-tag (tag) + "Display threads matching TAG in a notmuch-search buffer." + (interactive + (list (notmuch-select-tag-with-completion "Notmuch search tag: "))) + (notmuch-search (concat "tag:" tag))) + ;;;###autoload (defun notmuch () "Run notmuch and display saved searches, known tags, etc."