From 547ae4cc92e6f32b6f78074a4388cd79ab9aad8b Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 13 Jan 2022 23:50:40 +0000 Subject: jao-notmuch: better tags reset --- lib/net/jao-notmuch.el | 7 ++++--- notmuch.org | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index ebb348a..fa33b37 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -299,9 +299,9 @@ (outline-show-entry) (when and-show (notmuch-tree-show-message nil))) -(defun jao-notmuch-tree--next (prev thread no-exit) +(defun jao-notmuch-tree--next (prev thread no-exit &optional ignore-new) (let ((line-move-ignore-invisible nil)) - (cond ((jao-notmuch--looking-at-new-p)) + (cond ((and (not ignore-new) (jao-notmuch--looking-at-new-p))) (thread (notmuch-tree-next-thread prev) (unless (or (not (notmuch-tree-get-message-properties)) @@ -414,7 +414,8 @@ (defun jao-notmuch-tree-reset-tags () (interactive) (let ((tags (plist-get (notmuch-tree-get-message-properties) :orig-tags))) - (jao-notmuch-tree--tag tags nil nil))) + (jao-notmuch-tree--tag tags nil nil) + (jao-notmuch-tree--next nil nil t t))) ;;;; Results formatters diff --git a/notmuch.org b/notmuch.org index c12019a..b8c2dda 100644 --- a/notmuch.org +++ b/notmuch.org @@ -132,8 +132,9 @@ ;; ,(jao-notmuch--q "feeds" "today" "tf" '("tag:feeds" "date:24h..")) ,(jao-notmuch--q "bml" "flagged" "rb" '("tag:flagged" "tag:bigml")) ,(jao-notmuch--q "bml" "todo" "btt" '("tag:todo" "tag:bigml")) - ,(jao-notmuch--q "jao" "flagged" "rj" '("tag:flagged" "not tag:bigml")) + ,(jao-notmuch--q "jao" "flagged" "rj" '("tag:flagged" "tag:jao")) ,(jao-notmuch--q "jao" "todo" "jt" '("tag:todo" "not tag:bigml")) + ,(jao-notmuch--q "feeds" "flagged" "rf" '("tag:flagged" "tag:feeds")) ,(jao-notmuch--q "new" nil "nn" '("tag:new")) ,(jao-notmuch--q "unread" nil "nu" '("tag:unread")))) -- cgit v1.2.3