summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/net/jao-notmuch.el26
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index f8a4648..11b239f 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -54,12 +54,6 @@
(notmuch-tree-close-message-window)
(notmuch-tree-show-message nil)))
-(defun jao-notmuch-click-message-buffer ()
- (interactive)
- (let ((b (current-buffer)))
- (unless (eq 'url (jao-notmuch-goto-message-buffer t t))
- (pop-to-buffer b))))
-
(defun jao-notmuch-tree--find-tree-buffer ()
(or jao-notmuch--tree-buffer
(let ((mb (current-buffer)))
@@ -293,13 +287,29 @@
(outline-show-entry)
(when and-show (notmuch-tree-show-message nil)))
+(defsubst jao-notmuch-tree--message-open ()
+ (and (buffer-live-p notmuch-tree-message-buffer)
+ (get-buffer-window notmuch-tree-message-buffer)))
+
+(defsubst jao-notmuch--get-prop (prop &optional props)
+ (or (and props (plist-get props prop))
+ (notmuch-tree-get-prop prop)
+ (notmuch-show-get-prop prop)))
+
+(defun jao-notmuch--looking-at-match-p ()
+ (and (jao-notmuch--get-prop :match)
+ (equal (jao-notmuch--get-prop :orig-tags)
+ (jao-notmuch--get-prop :tags))))
+
(defun jao-notmuch-tree--next (prev thread no-exit &optional ignore-new)
(let ((line-move-ignore-invisible nil))
- (cond ((and (not ignore-new) (jao-notmuch--looking-at-new-p)))
+ (cond ((and (not ignore-new)
+ (jao-notmuch--looking-at-match-p)
+ (not (jao-notmuch-tree--message-open))))
(thread
(notmuch-tree-next-thread prev)
(unless (or (not (notmuch-tree-get-message-properties))
- (jao-notmuch--looking-at-new-p))
+ (jao-notmuch--looking-at-match-p))
(notmuch-tree-matching-message prev (not no-exit))))
(t (notmuch-tree-matching-message prev (not no-exit)))))
(when (notmuch-tree-get-message-id)