aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Jed Brown <jed@59A2.org>2009-11-26 22:36:50 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-27 05:57:07 -0800
commit0ce9c53fd4c012d8a67937aa1ad60519f7f45987 (patch)
tree18b2e79a9177b458994c283d5cddceb72cbc4474 /notmuch.el
parent7293d848269649c0801287d985a8542aab096e9f (diff)
notmuch-search-add/remove-tag: restrict to messages in current query
Rather than tagging the everything in the thread. This is arguably more desirable behavior and is consistent with clearly desirably behavior of notmuch-search-operate-all. Note that this change applies indirectly to notmuch-search-archive-thread (which is actually equivalent behavior since this function is primarily used when browsing an inbox). Signed-off-by: Jed Brown <jed@59A2.org>
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/notmuch.el b/notmuch.el
index 6adac9e6..e9786c0b 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -935,15 +935,19 @@ and will also appear in a buffer named \"*Notmuch errors*\"."
(split-string (buffer-substring beg end))))))
(defun notmuch-search-add-tag (tag)
+ "Add a tag to messages in the current thread matching the
+active query."
(interactive
(list (notmuch-select-tag-with-completion "Tag to add: ")))
- (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id))
+ (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
(notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<))))
(defun notmuch-search-remove-tag (tag)
+ "Remove a tag from messages in the current thread matching the
+active query."
(interactive
(list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-search-find-thread-id))))
- (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id))
+ (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
(notmuch-search-set-tags (delete tag (notmuch-search-get-tags))))
(defun notmuch-search-archive-thread ()