aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2024-08-10 14:36:24 -0300
committerDavid Bremner <david@tethera.net>2025-03-13 07:56:05 -0300
commit41d5e5956e4a01fda4bfe07a2897939b04606c51 (patch)
treebd0e8b692327f588944e062692715d9bb3bfe703
parent43e90e7caa9cbb10097ed9526052fe82cd30b9f0 (diff)
emacs/tree: call notmuch-hl-line-mode from tree-sentinel
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.
-rw-r--r--emacs/notmuch-tree.el2
-rwxr-xr-xtest/T312-emacs-hl-line.sh6
2 files changed, 2 insertions, 6 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 24a9970f..481b0b34 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -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)
diff --git a/test/T312-emacs-hl-line.sh b/test/T312-emacs-hl-line.sh
index dd27db0e..3402811c 100755
--- a/test/T312-emacs-hl-line.sh
+++ b/test/T312-emacs-hl-line.sh
@@ -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)