X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=37f0ebb337ae656812b8a472baa3f95b6e99cebf;hb=c1bcf5f8c0874a38b27bdd38b4c74d248d32c2f6;hp=79fa5c523b06ec4dd6694404c3d2f41364679f7a;hpb=dba0e53ea840e33756813c3b35bb5b5793b009c7;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 79fa5c52..37f0ebb3 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1653,22 +1653,26 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'." (let* ((current-tags (notmuch-show-get-tags)) (new-tags (notmuch-update-tags current-tags tag-changes))) (unless (equal current-tags new-tags) - (apply 'notmuch-tag (notmuch-show-get-message-id) tag-changes) + (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes) (notmuch-show-set-tags new-tags)))) -(defun notmuch-show-tag (&optional initial-input) - "Change tags for the current message, read input from the minibuffer." +(defun notmuch-show-tag (&optional tag-changes) + "Change tags for the current message. + +See `notmuch-tag' for information on the format of TAG-CHANGES." (interactive) - (let ((tag-changes (notmuch-read-tag-changes - initial-input (notmuch-show-get-message-id)))) - (apply 'notmuch-show-tag-message tag-changes))) + (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)) + (let* ((current-tags (notmuch-show-get-tags)) + (new-tags (notmuch-update-tags current-tags tag-changes))) + (unless (equal current-tags new-tags) + (notmuch-show-set-tags new-tags)))) -(defun notmuch-show-tag-all (&rest tag-changes) - "Change tags for all messages in the current buffer. +(defun notmuch-show-tag-all (&optional tag-changes) + "Change tags for all messages in the current show buffer. -TAG-CHANGES is a list of tag operations for `notmuch-tag'." - (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id)) - (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes) +See `notmuch-tag' for information on the format of TAG-CHANGES." + (interactive) + (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes)) (notmuch-show-mapc (lambda () (let* ((current-tags (notmuch-show-get-tags))