unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable
@ 2020-08-11 17:36 William Casarin
  2020-08-11 17:36 ` [PATCH v2 2/3] emacs/tree: enable moving to next thread in search results William Casarin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: William Casarin @ 2020-08-11 17:36 UTC (permalink / raw)
  To: notmuch; +Cc: Teemu Likonen, William Casarin

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>
---

This is a rebased version of id:20200423234715.6633-1-jb55@jb55.com on
top of Jonas' emacs cleanups.

This patch series makes it easier to navigate threads in tree mode.

Basic usage: a thread is entered via M-RET. Then you can use A to
archive and jump to the next thread.

 emacs/notmuch-tree.el | 6 +++++-
 emacs/notmuch.el      | 2 +-
 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."

base-commit: 1c80020e701c7323de137c0616fc8864443d7bd3
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-16 13:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 17:36 [PATCH v2 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable William Casarin
2020-08-11 17:36 ` [PATCH v2 2/3] emacs/tree: enable moving to next thread in search results William Casarin
2020-08-15 12:54   ` David Bremner
2020-08-11 17:36 ` [PATCH v2 3/3] emacs/tree: add notmuch-tree-archive-thread-then-next William Casarin
2020-08-15 12:32 ` [PATCH v2 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable David Bremner
2020-08-15 12:41   ` David Bremner
2020-08-16 13:59 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).