X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/f5db7ad7d243785c274a99734c681e69d13313d0..6a833a6e83865f6999707cc30768d07e1351c2cb:/emacs/notmuch-jump.el diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 05ec57ec..963253c9 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 ;; @@ -15,11 +15,13 @@ ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License -;; along with Notmuch. If not, see . +;; along with Notmuch. If not, see . ;; ;; 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)) @@ -170,3 +174,9 @@ buffer." (setq notmuch-jump--action ',(third action)) (exit-minibuffer)))) map)) + +;; + +(provide 'notmuch-jump) + +;;; notmuch-jump.el ends here