-;;; notmuch-tree.el --- displaying notmuch forests.
+;;; notmuch-tree.el --- displaying notmuch forests
;;
;; Copyright © Carl Worth
;; Copyright © David Edmondson
(require 'notmuch-show)
(require 'notmuch-tag)
(require 'notmuch-parser)
+(require 'notmuch-jump)
(declare-function notmuch-search "notmuch"
(&optional query oldest-first target-thread target-line))
"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.
(scroll-up)))))
(defun notmuch-tree-scroll-message-window-back ()
- "Scroll the message window back(if it exists)."
+ "Scroll the message window back (if it exists)."
(interactive)
(when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(scroll-down)))))
(defun notmuch-tree-scroll-or-next ()
- "Scroll the message window. If it at end go to next message."
+ "Scroll the message window.
+If it at end go to next message."
(interactive)
(when (notmuch-tree-scroll-message-window)
(notmuch-tree-next-matching-message)))
")")
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:
;; 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)