(defun notmuch-pick-tag (&optional tag-changes)
"Change tags for the current message"
(interactive)
- (setq tag-changes (funcall 'notmuch-tag (notmuch-pick-get-message-id) tag-changes))
+ (setq tag-changes (notmuch-tag (notmuch-pick-get-message-id) tag-changes))
(notmuch-pick-tag-update-display tag-changes))
(defun notmuch-pick-add-tag ()
"Archive the current message.
Archive the current message by applying the tag changes in
-`notmuch-archive-tags' to it (remove the \"inbox\" tag by
-default). If a prefix argument is given, the message will be
-\"unarchived\", i.e. the tag changes in `notmuch-archive-tags'
-will be reversed."
+`notmuch-archive-tags' to it. If a prefix argument is given, the
+message will be \"unarchived\", i.e. the tag changes in
+`notmuch-archive-tags' will be reversed."
(interactive "P")
(when notmuch-archive-tags
(apply 'notmuch-pick-tag
(save-excursion
(goto-char (point-max))
(notmuch-pick-insert-msg msg))
- (let ((msg-id (notmuch-id-to-query (plist-get msg :id))))
- (when (string= msg-id notmuch-pick-target-msg)
+ (let ((msg-id (notmuch-id-to-query (plist-get msg :id)))
+ (target notmuch-pick-target-msg))
+ (when (or (and (not target) (plist-get msg :match))
+ (string= msg-id target))
(setq notmuch-pick-target-msg "found")
(goto-char (point-max))
(forward-line -1))))