summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Casarin <jb55@jb55.com>2020-08-11 10:36:51 -0700
committerDavid Bremner <david@tethera.net>2020-08-16 10:42:02 -0300
commit189175ecd6fde78ded219a4bc6dd7b649564c30f (patch)
tree5fe3d729f6e474c038a83f08c8fa1d9546c2998a
parent25f9a42287a7a2ad58a1dff5ccfe75fe7e26d8db (diff)
emacs/tree: introduce notmuch-tree-parent-buffer variable
This variable will be used in a similar fashion to notmuch-show-parent-buffer. It will be used to navigate between threads from the parent search buffer. Signed-off-by: William Casarin <jb55@jb55.com>
-rw-r--r--emacs/notmuch-tree.el6
-rw-r--r--emacs/notmuch.el2
2 files changed, 6 insertions, 2 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index fbba4bb3..29f64851 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -222,6 +222,9 @@ For example:
"A buffer local copy of argument open-target to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-open-target)
+(defvar notmuch-tree-parent-buffer nil)
+(make-variable-buffer-local 'notmuch-tree-parent-buffer)
+
(defvar notmuch-tree-message-window nil
"The window of the message pane.
@@ -1050,7 +1053,7 @@ the same as for the function notmuch-tree."
")")
notmuch-tree-basic-query))
-(defun notmuch-tree (&optional query query-context target buffer-name open-target unthreaded)
+(defun notmuch-tree (&optional query query-context target buffer-name open-target unthreaded parent-buffer)
"Display threads matching QUERY in tree view.
The arguments are:
@@ -1080,6 +1083,7 @@ The arguments are:
;; Don't track undo information for this buffer
(set 'buffer-undo-list t)
(notmuch-tree-worker query query-context target open-target unthreaded)
+ (setq notmuch-tree-parent-buffer parent-buffer)
(setq truncate-lines t))
(defun notmuch-unthreaded (&optional query query-context target buffer-name open-target)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index babddbb6..8132cea6 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -545,7 +545,7 @@ thread."
notmuch-search-query-string
nil
(notmuch-prettify-subject (notmuch-search-find-subject))
- t))
+ t nil (current-buffer)))
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
"Begin composing a reply-all to the entire current thread in a new buffer."