]> git.notmuchmail.org Git - notmuch/commitdiff
emacs/tree use notmuch-show-single-message
authorDavid Bremner <david@tethera.net>
Sat, 26 Jun 2021 12:04:28 +0000 (09:04 -0300)
committerDavid Bremner <david@tethera.net>
Sun, 27 Jun 2021 17:41:23 +0000 (14:41 -0300)
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
test/T465-emacs-unthreaded.sh

index 00ee78d69bec59862b0569dba08f73ccedefb73e..56863701ee5f4c950a7df28adf7d60f3ba4c6cce 100644 (file)
@@ -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.
index 16ff89a9b977ed257fcfb44e9d61c6feb620a272..f9a0942620018c36892b1c0d11df1c355dc9e495 100755 (executable)
@@ -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)