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
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org