From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6Mv2CdrYMl+YIAAA0tVLHw (envelope-from ) for ; Tue, 11 Aug 2020 17:43:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KN8cBNrYMl/xTQAAbx9fmQ (envelope-from ) for ; Tue, 11 Aug 2020 17:43:54 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D2D76940291 for ; Tue, 11 Aug 2020 17:43:53 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 653D629B03; Tue, 11 Aug 2020 13:43:46 -0400 (EDT) Received: from jb55.com (unknown [IPv6:2600:3c01::f03c:91ff:fe08:5bfb]) by mail.notmuchmail.org (Postfix) with ESMTPS id 9FD0E1F9DC for ; Tue, 11 Aug 2020 13:43:42 -0400 (EDT) Received: from jb55.com (S010660e327dca171.vc.shawcable.net [24.84.152.187]) by jb55.com (OpenSMTPD) with ESMTPSA id 5d41558b (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 11 Aug 2020 17:37:29 +0000 (UTC) From: William Casarin To: notmuch@notmuchmail.org Cc: Teemu Likonen , William Casarin Subject: [PATCH v2 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable Date: Tue, 11 Aug 2020 10:36:51 -0700 Message-Id: <20200811173653.18109-1-jb55@jb55.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Message-ID-Hash: 2E6ZEOIEVWY6YTNPGTVB47WOS4B5X57G X-Message-ID-Hash: 2E6ZEOIEVWY6YTNPGTVB47WOS4B5X57G X-MailFrom: jb55@jb55.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 2.83 X-TUID: fMl3lC41ADgF 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 --- 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