X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-jump.el;h=fd770f1ec50e39f81afe481374fafbbc2f97b72a;hb=da5029e2ac8dfd8a839de1f6a4701237d0b34db1;hp=20e24b252630fe2992092cbeac8e8f606f27f1c9;hpb=961937988e5c8947ddabdaa34454309912fc809b;p=notmuch diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 20e24b25..fd770f1e 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -1,4 +1,4 @@ -;; notmuch-jump.el --- User-friendly shortcut keys +;;; notmuch-jump.el --- User-friendly shortcut keys ;; ;; Copyright © Austin Clements ;; @@ -20,6 +20,8 @@ ;; Authors: Austin Clements ;; David Edmondson +;;; Code: + (eval-when-compile (require 'cl)) (require 'notmuch-lib) @@ -54,7 +56,9 @@ fast way to jump to a saved search from anywhere in Notmuch." (oldest-first t) (otherwise (default-value 'notmuch-search-oldest-first))))) (push (list key name - `(lambda () (notmuch-search ',query ',oldest-first))) + (if (eq (plist-get saved-search :search-type) 'tree) + `(lambda () (notmuch-tree ',query)) + `(lambda () (notmuch-search ',query ',oldest-first)))) action-map))))) (setq action-map (nreverse action-map)) @@ -174,3 +178,5 @@ buffer." ;; (provide 'notmuch-jump) + +;;; notmuch-jump.el ends here