X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=contrib%2Fnotmuch-pick%2Fnotmuch-pick.el;h=ef16ca75c6c1662115b6e207bb768cffdbc59f3d;hp=b03c9dde01fb8533209c0836c62c5dd459d29789;hb=f9aad24f02af7e7b3810704f227ca1b8ef0c6229;hpb=cec063736a2a5221e7fd41710f6e224bdb3cd3d7 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index b03c9dde..ef16ca75 100644 --- a/contrib/notmuch-pick/notmuch-pick.el +++ b/contrib/notmuch-pick/notmuch-pick.el @@ -282,7 +282,7 @@ Does NOT change the database." (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 () @@ -384,7 +384,8 @@ Does NOT change the database." (with-current-buffer buffer (setq notmuch-pick-message-window window) (add-hook 'kill-buffer-hook 'notmuch-pick-message-window-kill-hook))) - (notmuch-pick-tag-update-display (list "-unread")) + (when notmuch-show-mark-read-tags + (notmuch-pick-tag-update-display notmuch-show-mark-read-tags)) (setq notmuch-pick-message-buffer buffer)))) (defun notmuch-pick-show-message-out () @@ -442,10 +443,9 @@ Does NOT change the database." "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 @@ -652,8 +652,10 @@ unchanged ADDRESS if parsing fails." (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))))