From 807e7bbdff9bbe160b9f716c821ab13328a9f083 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 7 Sep 2021 14:50:54 +0100 Subject: notmuch little things --- lib/net/jao-notmuch.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/net') diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 2b5656a..6039238 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -69,15 +69,15 @@ "Scroll or next message in forest or exit if none." (interactive) (if (notmuch-tree-scroll-message-window) - (notmuch-tree-next-matching-message t) + (jao-notmuch-tree-next nil) (when (not (window-live-p notmuch-tree-message-window)) (notmuch-tree-show-message nil))) (jao-notmuch--tree-update-buffer-name)) -(defun jao-notmuch-tree-show-or-scroll () +(defun jao-notmuch-tree-show-or-scroll (force) "Show current message, or scroll it if visible." - (interactive) - (if (window-live-p notmuch-tree-message-window) + (interactive "P") + (if (and (not force) (window-live-p notmuch-tree-message-window)) (scroll-other-window 1) (notmuch-tree-show-message nil) (jao-notmuch--tree-update-buffer-name))) @@ -290,9 +290,10 @@ (let ((line-move-ignore-invisible nil)) (cond ((jao-notmuch--looking-at-new-p)) (thread - (when (notmuch-tree-next-thread prev) - (unless (jao-notmuch--looking-at-new-p) - (notmuch-tree-matching-message prev (not no-exit))))) + (notmuch-tree-next-thread prev) + (unless (or (not (notmuch-tree-get-message-properties)) + (jao-notmuch--looking-at-new-p)) + (notmuch-tree-matching-message prev (not no-exit)))) (t (notmuch-tree-matching-message prev (not no-exit))))) (when (notmuch-tree-get-message-id) (jao-notmuch-tree-hide-others t)) -- cgit v1.2.3