From 144e63edbe007c4fac3918a67e6cf0d957fa832b Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 5 Nov 2025 18:22:51 +0000 Subject: jao-notmuch-mark-all-readd (gnus's c's envy) --- custom/jao-custom-notmuch.el | 1 + lib/net/jao-notmuch.el | 6 ++++++ 2 files changed, 7 insertions(+) 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)) -- cgit v1.2.3