X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=d6350ebe78a1240b94c7793b9aa39da4e29ae7a6;hp=6adac9e663e7d9cf79325ae506dd991e21269194;hb=12c91e8050eb0ae1ec68e1639560f8eba4654d9b;hpb=7293d848269649c0801287d985a8542aab096e9f diff --git a/notmuch.el b/notmuch.el index 6adac9e6..d6350ebe 100644 --- a/notmuch.el +++ b/notmuch.el @@ -49,6 +49,7 @@ (require 'cl) (require 'mm-view) +(require 'message) (defvar notmuch-show-mode-map (let ((map (make-sparse-keymap))) @@ -935,15 +936,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 ()