]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-jump.el
notmuch-hello/jump: allow saved searches to specify unthreaded mode
[notmuch] / emacs / notmuch-jump.el
index 3e20b8c7afc68e6b9d56a709ecc74283b173ae38..1cdf5b5090d7cb594f29338e3eb98cb56f64ceb1 100644 (file)
@@ -56,9 +56,13 @@ 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
-                       (if (eq (plist-get saved-search :search-type) 'tree)
-                           `(lambda () (notmuch-tree ',query))
-                         `(lambda () (notmuch-search ',query ',oldest-first))))
+                       (cond
+                        ((eq (plist-get saved-search :search-type) 'tree)
+                         `(lambda () (notmuch-tree ',query)))
+                        ((eq (plist-get saved-search :search-type) 'unthreaded)
+                         `(lambda () (notmuch-unthreaded ',query)))
+                        (t
+                         `(lambda () (notmuch-search ',query ',oldest-first)))))
                  action-map)))))
     (setq action-map (nreverse action-map))