X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tag.el;h=c7f62c90974995caf64aea212e0a5eae9fa97b5e;hb=f76d8f82dd004cf14426a91e8a80dcd2a4b97317;hp=07c260ebbd07e13e23ce6524d1a5fdc9368ca481;hpb=941e172724188eb0f65bc05035a0a6871a70ba72;p=notmuch diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 07c260eb..c7f62c90 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -265,7 +265,7 @@ changed (the normal case) are shown using formats from (defcustom notmuch-before-tag-hook nil "Hooks that are run before tags of a message are modified. -'tags' will contain the tags that are about to be added or removed as +'tag-changes' will contain the tags that are about to be added or removed as a list of strings of the form \"+TAG\" or \"-TAG\". 'query' will be a string containing the search query that determines the messages that are about to be tagged" @@ -277,7 +277,7 @@ the messages that are about to be tagged" (defcustom notmuch-after-tag-hook nil "Hooks that are run after tags of a message are modified. -'tags' will contain the tags that were added or removed as +'tag-changes' will contain the tags that were added or removed as a list of strings of the form \"+TAG\" or \"-TAG\". 'query' will be a string containing the search query that determines the messages that were tagged" @@ -387,6 +387,8 @@ notmuch-after-tag-hook will be run." (unless (string-match-p "^[-+]\\S-+$" tag-change) (error "Tag must be of the form `+this_tag' or `-that_tag'"))) tag-changes) + (unless query + (error "Nothing to tag!")) (unless (null tag-changes) (run-hooks 'notmuch-before-tag-hook) (if (<= (length query) notmuch-tag-argument-limit)