emacs: move search based tree functions to notmuch.el
authorMark Walters <markwalters1009@gmail.com>
Fri, 1 Nov 2013 09:23:43 +0000 (09:23 +0000)
committerDavid Bremner <david@tethera.net>
Thu, 7 Nov 2013 11:52:43 +0000 (07:52 -0400)
Move a couple of the search mode specifc caller helpers for tree from
tree into notmuch.el.

emacs/notmuch-tree.el
emacs/notmuch.el

index ebfb5e7b8c2a449be91453a20079a211d472441f..78b4a57ee3432743098c231c88e041c6a958252f 100644 (file)
@@ -413,24 +413,6 @@ Does NOT change the database."
                notmuch-show-query-context
                (notmuch-show-get-message-id)))
 
-;; This function should be in notmuch.el but be we trying to minimise
-;; impact on the rest of the codebase.
-(defun notmuch-tree-from-search-current-query ()
-  "Call notmuch tree with the current query"
-  (interactive)
-  (notmuch-tree notmuch-search-query-string))
-
-;; This function should be in notmuch.el but be we trying to minimise
-;; impact on the rest of the codebase.
-(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-tree-message-window-kill-hook ()
   "Close the message pane when exiting the show buffer."
   (let ((buffer (current-buffer)))
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")