aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-11-01 09:23:43 +0000
committerGravatar David Bremner <david@tethera.net>2013-11-07 07:52:43 -0400
commit00b3ee4f82ed94125f6789ba7bdd88b98ed248ef (patch)
tree269707843e8fae159ccd7052fba7700415087e61 /emacs
parent10bf1b740096b75da2618bb2b1a9f79257eb76ca (diff)
emacs: move search based tree functions to notmuch.el
Move a couple of the search mode specifc caller helpers for tree from tree into notmuch.el.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-tree.el18
-rw-r--r--emacs/notmuch.el14
2 files changed, 14 insertions, 18 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index ebfb5e7b..78b4a57e 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -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)))
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 418c7812..2c9a07c1 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -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")