]> rtime.felk.cvut.cz Git - notmuch.git/blobdiff - emacs/notmuch.el
emacs: move search based tree functions to notmuch.el
[notmuch.git] / emacs / notmuch.el
index 418c78124b01fdabcc29d1b6e97033d5419c1c88..2c9a07c11a248744de0c0b65ee057940dc18b805 100644 (file)
@@ -439,6 +439,20 @@ If BARE is set then do not prefix with \"thread:\""
                      (concat "*" (truncate-string-to-width subject 30 nil nil t) "*"))
       (message "End of search results."))))
 
+(defun notmuch-tree-from-search-current-query ()
+  "Call notmuch tree with the current query"
+  (interactive)
+  (notmuch-tree notmuch-search-query-string))
+
+(defun notmuch-tree-from-search-thread ()
+  "Show the selected thread with notmuch-tree"
+  (interactive)
+  (notmuch-tree (notmuch-search-find-thread-id)
+                notmuch-search-query-string
+               nil
+                (notmuch-prettify-subject (notmuch-search-find-subject))
+               t))
+
 (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
   "Begin composing a reply-all to the entire current thread in a new buffer."
   (interactive "P")