unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: William Casarin <jb55@jb55.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable
Date: Thu, 23 Apr 2020 16:47:13 -0700	[thread overview]
Message-ID: <20200423234715.6633-1-jb55@jb55.com> (raw)

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>
---
 emacs/notmuch-tree.el | 7 ++++++-
 emacs/notmuch.el      | 4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 701d12f8..f38fef98 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -219,6 +219,9 @@ Note the author string should not contain
   "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.
 
@@ -1037,7 +1040,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:
@@ -1070,6 +1073,8 @@ The arguments are:
 
   (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 f5f03244..a7cdd893 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -536,7 +536,9 @@ 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."
-- 
2.25.1

             reply	other threads:[~2020-04-23 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 23:47 William Casarin [this message]
2020-04-23 23:47 ` [PATCH 2/3] emacs/tree: enable moving to next thread in search results William Casarin
2020-04-24  0:07   ` William Casarin
2020-08-07 11:49     ` Teemu Likonen
2020-04-23 23:47 ` [PATCH 3/3] emacs/tree: add notmuch-tree-archive-thread-then-next William Casarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200423234715.6633-1-jb55@jb55.com \
    --to=jb55@jb55.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).