[PATCH] emacs: Extend the archive function to operate on regions too.
Servilio Afre Puentes
servilio at gmail.com
Tue Apr 13 06:06:41 PDT 2010
Signed-off-by: Servilio Afre Puentes <servilio at gmail.com>
---
emacs/notmuch.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 517c53a..4d4971f 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -264,7 +264,7 @@ For a mouse binding, return nil."
(define-key map "f" 'notmuch-search-filter)
(define-key map [mouse-1] 'notmuch-search-show-thread)
(define-key map "*" 'notmuch-search-operate-all)
- (define-key map "a" 'notmuch-search-archive-thread)
+ (define-key map "a" 'notmuch-search-archive-thread-or-region)
(define-key map "-" 'notmuch-search-remove-tag)
(define-key map "+" 'notmuch-search-add-tag)
(define-key map (kbd "RET") 'notmuch-search-show-thread)
@@ -359,7 +359,7 @@ participants in the thread, a representative
subject line, and
any tags).
Pressing \\[notmuch-search-show-thread] on any line displays that
thread. The '\\[notmuch-search-add-tag]' and
'\\[notmuch-search-remove-tag]'
-keys can be used to add or remove tags from a thread. The
'\\[notmuch-search-archive-thread]' key
+keys can be used to add or remove tags from a thread. The
'\\[notmuch-search-archive-thread-or-region]' key
is a convenience for archiving a thread (removing the \"inbox\"
tag). The '\\[notmuch-search-operate-all]' key can be used to add or
remove a tag from all
threads in the current buffer.
@@ -566,12 +566,12 @@ thread or threads in the current region."
(notmuch-search-remove-tag-region tag beg end))
(notmuch-search-remove-tag-thread tag))))
-(defun notmuch-search-archive-thread ()
- "Archive the currently selected thread (remove its \"inbox\" tag).
+(defun notmuch-search-archive-thread-or-region ()
+ "Archive the currently selected thread or region (remove its \"inbox\" tag).
This function advances the next thread when finished."
(interactive)
- (notmuch-search-remove-tag-thread "inbox")
+ (notmuch-search-remove-tag "inbox")
(forward-line))
(defun notmuch-search-process-sentinel (proc msg)
--
1.7.0.4
More information about the notmuch
mailing list