From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KNfbFQkpol4MOAAA0tVLHw (envelope-from ) for ; Thu, 23 Apr 2020 23:47:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sBbyHg8pol6lPQAAB5/wlQ (envelope-from ) for ; Thu, 23 Apr 2020 23:47:27 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B015F941D3E for ; Thu, 23 Apr 2020 23:47:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3FB656DE1372; Thu, 23 Apr 2020 16:47:24 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zmEu_wmeyTWz; Thu, 23 Apr 2020 16:47:23 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 3EB066DE10B2; Thu, 23 Apr 2020 16:47:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 835496DE10B2 for ; Thu, 23 Apr 2020 16:47:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jiiSSWQVzzRx for ; Thu, 23 Apr 2020 16:47:22 -0700 (PDT) Received: from cfg.domain (jb55.com [45.79.91.128]) by arlo.cworth.org (Postfix) with ESMTPS id EA9986DE101A for ; Thu, 23 Apr 2020 16:47:21 -0700 (PDT) Received: from jb55.com (S010660e327dca171.vc.shawcable.net [24.84.152.187]) by jb55.com (OpenSMTPD) with ESMTPSA id 368cd7e7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 23 Apr 2020 23:47:31 +0000 (UTC) From: William Casarin 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 Message-Id: <20200423234715.6633-1-jb55@jb55.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: 1.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [1.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.46032475847667]; MX_INVALID(1.00)[cached]; R_SPF_ALLOW(-0.20)[+a:c]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; TO_DN_NONE(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[50.126.95.6:from]; MAILLIST(-0.20)[mailman]; RECEIVED_SPAMHAUS_PBL(0.00)[24.84.152.187:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[jb55@jb55.com,notmuch-bounces@notmuchmail.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[notmuchmail.org:email,jb55.com:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; DMARC_NA(0.00)[jb55.com]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: uT/1D2F69RyY 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 --- 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