summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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))