summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-05 18:22:51 +0000
committerjao <jao@gnu.org>2025-11-05 18:22:51 +0000
commit144e63edbe007c4fac3918a67e6cf0d957fa832b (patch)
tree497c49de656e398fad76ccb9ce3212cd89d09987
parent83bd6a98d80180dc0e2a7b93d8362d82924ba5ab (diff)
downloadelibs-144e63edbe007c4fac3918a67e6cf0d957fa832b.tar.gz
elibs-144e63edbe007c4fac3918a67e6cf0d957fa832b.tar.bz2
jao-notmuch-mark-all-readd (gnus's c's envy)
-rw-r--r--custom/jao-custom-notmuch.el1
-rw-r--r--lib/net/jao-notmuch.el6
2 files changed, 7 insertions, 0 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index e341d0e..383fe85 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -522,6 +522,7 @@
("h" . jao-notmuch-goto-message-buffer)
("i" . jao-notmuch-toggle-images)
("k" . jao-notmuch-tree-read-thread)
+ ("K" . jao-notmuch-tree-mark-all-read)
("N" . jao-notmuch-tree--forward)
("O" . notmuch-tree-toggle-order)
("o" . jao-notmuch-tree-widen-search)
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 7ae9a4f..73f6420 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -316,6 +316,12 @@
(let ((undo (jao-notmuch--has-tag "deleted")))
(jao-notmuch-tree-tag-thread '("+deleted" "-new" "-unread") undo full)))
+(defun jao-notmuch-tree-mark-all-read ()
+ (interactive)
+ (when-let* ((q notmuch-tree-basic-query))
+ (when (yes-or-no-p "Mark all messages as read? ")
+ (notmuch-tag q '("-new" "-unread")))))
+
(defun jao-notmuch-tree-read-thread (full)
(interactive "P")
(jao-notmuch-tree-tag-thread '("-unread" "-new") nil full))