From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ODu2KzjDuGAEvwAAgWs5BA (envelope-from ) for ; Thu, 03 Jun 2021 13:55:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kDJXJzjDuGBjXwAAB5/wlQ (envelope-from ) for ; Thu, 03 Jun 2021 11:55:36 +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) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31D9319323 for ; Thu, 3 Jun 2021 13:55:36 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0ECFD2B24A; Thu, 3 Jun 2021 07:55:18 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1A2862B23D for ; Thu, 3 Jun 2021 07:55:09 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 005075FD28; Thu, 3 Jun 2021 07:55:08 -0400 (EDT) Received: (nullmailer pid 987725 invoked by uid 1000); Thu, 03 Jun 2021 11:55:04 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 3/3] emacs/tree use notmuch-show-single-message Date: Thu, 3 Jun 2021 08:55:00 -0300 Message-Id: <20210603115500.987504-4-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210603115500.987504-1-david@tethera.net> References: <20210603115500.987504-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: FTGBN77BYLWRWM4HIDFFBGO26XFWAVCU X-Message-ID-Hash: FTGBN77BYLWRWM4HIDFFBGO26XFWAVCU X-MailFrom: bremner@tethera.net 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622721336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1bP+62ZMifTcPUY6lKAMH3QObH2nUp7rBCHWUITbphs=; b=IFWV0NR7m6/7bkKBPDrzKH5vnIkrtnlHzeuTiC+SBb5Yncl2XPfZZQfbRTmfwKFJZbIxyJ BWUKCyD6Ptlel/mETB5pyY4LOmTYnI0he+sIOYag9/P/p1OoMDf66pBfAVbeQqcSRVNXlL KPO2P8iw7pMjIpiEPZIUUxwjzsgTD2qVsSC0YClN1QHuRK1nJg7Kt2n7ErscEfQx+gaKKE j8VFsOVh1cyBN+OMGlWpby7ekO0wJX6CzMxrc++Bf3XpRz5ig3xlIm4KT5FJcY5cEPidzu 8YrPltpTz640cpMT/TP6oBWg0hunLVEv09cZd347rvnlFo7msc5Pu+j2YE4w/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622721336; a=rsa-sha256; cv=none; b=ZHe+Thb5j06IqQCYs5dOjt6YcugtdKIOCtc6UmtGlLX3CTRMln58Jez1S2zFvAnmWhnviu F4oQPQBuQC7q7vbpj/Y9nUpzA8u+/BaV3dnTCAlF+jz0o8zc1YskAsvQwQEr/5wWSEJOXB GtJWVkJCxqnYPK3gM3uakMwfsr274tn0+byFxZOIfjk0G3bDOQwgqiAenQBZSK8XD1VvU/ hmEFn3Wm1Mhy9jTD5GZuYJl+6zFWCEPLv/au4+zE4xIqXkfvQgnDYQFUvxJPEPoNL1R4vk fSI6rQWXyp8cjVvGeAc4PBriU/3Zbw1PX5lUqRVWcj6I8MrrILDKniJqt9YZzw== ARC-Authentication-Results: i=1; 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-Migadu-Spam-Score: -1.04 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-Migadu-Queue-Id: 31D9319323 X-Spam-Score: -1.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9MHtR5qahS/s This is more efficient that notmuch-show-only-matching-messages, since we do not parse the potentially large thread structure to find a single message. This is only a partial fix for notmuch-tree view, because displaying the thread structure in the tree-mode window still crashes on long threads. It is however enough to make unthreaded view handle long threads. --- emacs/notmuch-tree.el | 6 ++++-- test/T465-emacs-unthreaded.sh | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 13007a13..605c0593 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -574,7 +574,7 @@ NOT change the database." (with-selected-window notmuch-tree-message-window (let (;; Since we are only displaying one message do not indent. (notmuch-show-indent-messages-width 0) - (notmuch-show-only-matching-messages t) + (notmuch-show-single-message t) ;; Ensure that `pop-to-buffer-same-window' uses the ;; window we want it to use. (display-buffer-overriding-action @@ -598,7 +598,9 @@ NOT change the database." (when id ;; We close the window to kill off un-needed buffers. (notmuch-tree-close-message-window) - (notmuch-show id)))) + ;; n-s-s-m is buffer local, so use inner let. + (let ((notmuch-show-single-message t)) + (notmuch-show id))))) (defun notmuch-tree-show-message (arg) "Show the current message. diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh index f9abcebd..0dc52f3a 100755 --- a/test/T465-emacs-unthreaded.sh +++ b/test/T465-emacs-unthreaded.sh @@ -28,7 +28,6 @@ test_emacs '(let ((max-lisp-eval-depth 10)) test_expect_equal_file EXPECTED.unthreaded OUTPUT test_begin_subtest "message from large thread (status)" -test_subtest_known_broken output=$(test_emacs '(let ((max-lisp-eval-depth 10)) (notmuch-unthreaded "subject:large-thread") (notmuch-test-wait) -- 2.30.2