]> git.cworth.org Git - notmuch/commitdiff
emacs/tree: call notmuch-hl-line-mode from tree-sentinel
authorDavid Bremner <david@tethera.net>
Sat, 10 Aug 2024 17:36:24 +0000 (14:36 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 13 Mar 2025 10:56:05 +0000 (07:56 -0300)
There is a a perceptible gap between when the tree shows up and when
the hl-line is visible, but this is better than the previous state
where the line did not show up at all until the user moved the cursor.

emacs/notmuch-tree.el
test/T312-emacs-hl-line.sh

index 24a9970ffc8ebee10a595d1de6910b60e085ae02..481b0b34694b05f425f501870954c89e074e58e5 100644 (file)
@@ -1122,6 +1122,8 @@ object, and with the tree results buffer as the current buffer.")
                (unless (= exit-status 0)
                  (insert (format " (process returned %d)" exit-status)))
                (insert "\n"))))
+         (when (and notmuch-hl-line (= exit-status 0))
+           (notmuch-hl-line-mode))
          (run-hook-with-args 'notmuch-tree-process-exit-functions proc))))))
 
 (defun notmuch-tree-process-filter (proc string)
index dd27db0e25841af37de18f2e76e74b5b5c6dc1de..3402811caabbe3330802b49b816a7f1ce710ea20 100755 (executable)
@@ -20,7 +20,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                         (list 1 t)))'
 
 test_begin_subtest "line 1, tree"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -31,7 +30,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                         (list 1 t)))'
 
 test_begin_subtest "line 1, unthreaded"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -50,7 +48,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-test-expect-equal (overlay-start hl-line-overlay) 1))'
 
 test_begin_subtest "line 1, tree, refresh"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -63,7 +60,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                         (list 1 t)))'
 
 test_begin_subtest "line 1, unthreaded, refresh"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -115,7 +111,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                           (line-number-at-pos (overlay-start hl-line-overlay)) 12))'
 
 test_begin_subtest "line 12, tree, refresh"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -127,7 +122,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
                           (line-number-at-pos (overlay-start hl-line-overlay)) 12))'
 
 test_begin_subtest "line 12, unthreaded, refresh"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line t))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)