summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el1
-rw-r--r--lisp/km-mail.el7
2 files changed, 8 insertions, 0 deletions
diff --git a/init.el b/init.el
index 7668431..537e64d 100644
--- a/init.el
+++ b/init.el
@@ -2064,6 +2064,7 @@
:defer t
:after notmuch
:config
+ (define-key notmuch-search-mode-map "A" #'km/notmuch-archive-all)
(define-key notmuch-show-part-map "|"
#'km/notmuch-show-pipe-part-to-project)
(define-key notmuch-show-mode-map [remap notmuch-show-pipe-message]
diff --git a/lisp/km-mail.el b/lisp/km-mail.el
index 3ab7e50..345d2bb 100644
--- a/lisp/km-mail.el
+++ b/lisp/km-mail.el
@@ -50,6 +50,13 @@
(let ((default-directory project))
(call-interactively #'notmuch-show-pipe-part)))
+;;;###autoload
+(defun km/notmuch-archive-all ()
+ "Call `notmuch-search-archive-thread' with whole-buffer region."
+ (interactive)
+ (mark-whole-buffer)
+ (call-interactively #'notmuch-search-archive-thread))
+
;;; Mail sync