From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GJ/aJ+IX12CWaQEAgWs5BA (envelope-from ) for ; Sat, 26 Jun 2021 14:04:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EKFnI+IX12A6RQAAbx9fmQ (envelope-from ) for ; Sat, 26 Jun 2021 12:04:50 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 90D05CCB1 for ; Sat, 26 Jun 2021 14:04:49 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 07CCC290C4; Sat, 26 Jun 2021 08:04:42 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7B8CC290A8 for ; Sat, 26 Jun 2021 08:04:39 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 7296E5FD21; Sat, 26 Jun 2021 08:04:39 -0400 (EDT) Received: (nullmailer pid 153680 invoked by uid 1000); Sat, 26 Jun 2021 12:04:37 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 3/3] emacs/tree use notmuch-show-single-message Date: Sat, 26 Jun 2021 09:04:28 -0300 Message-Id: <20210626120428.153445-4-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210626120428.153445-1-david@tethera.net> References: <20210626120428.153445-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: SPZUJQJGNMS4MKLHCIPF27WX2V5DPDPF X-Message-ID-Hash: SPZUJQJGNMS4MKLHCIPF27WX2V5DPDPF 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=1624709090; 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=zssBEQrYWE3zRvBPbQYd817CyaeD9ThW+6vxSk0n2lk=; b=IpSmuGbJGpDQwgMC80qWu8UD8CNDQZx59+f4cfwTjIfnErozM9X2NTBMXd/1F/UZdcGJ+6 DnP07v0Kgut468b4e2+Wyi0IMLwkDzgTRfmDzHT1FzwUjp8oWrJQK+ifxVpKaXSWiF8gXv jIYHVGpKM+fIr9Y4lDXzZAknsNbbfv0w9V352jwp4T6H77WdrL4/eTtPvZ8dlTjDjobX7P Ry2EGLEcuWhwpR4wXFRaTR4wIY2Hj0jSGkNnUp8IjbSYEit5LDkbv4HecpeDSJRdX6DTT8 O/bB3mnPCPbLHXz8XX6DmfOyGTwFs3eSr6l4J5RqEoVOGWuTEz0xau1s9rMQaQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624709090; a=rsa-sha256; cv=none; b=gndruwro7btF03FHBWor1FSSGUfdmar3LhgzsYkDYW9WE+QqkyjrhRa2WYNVMgt2qaiodl Qb8ydNVAx1x0OuJC01FJJXpAqw/yZXQ2wVflSXCEKuTYqpWu3isMwEuoLc2t+UTFikjgE8 jID21VkZ/ijmLTf7OkSxLOoHLzDDZ0JmOhkMdjXSjA/X52CWuxIYIY5KDWTGdAkteIdCu7 e8U2HyWzBWhyile15zVLlERG9XfX7jKe0nhrpaa6KJ9nnve9gQNjpq7kT9pZ1pKnRBzvpO M+gcWZC/DPGOiii/EAXdU20H9cEC0dqdbDwobKarphk0FfzoNKGR7t4LlcgFnw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 90D05CCB1 X-Spam-Score: -1.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: CLuTQn+cMwUB This is more efficient than 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 00ee78d6..56863701 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -575,7 +575,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 @@ -599,7 +599,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 16ff89a9..f9a09426 100755 --- a/test/T465-emacs-unthreaded.sh +++ b/test/T465-emacs-unthreaded.sh @@ -26,7 +26,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