X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch.el;h=fb112f97665c82b81dfe320d1a384270f60261f1;hb=4aff2ca55bfe285ced36e9fe02c907d8b4120672;hp=d180fa4e51ba04f7ed7d9ba4df2a81e0a021f125;hpb=5e8ce15bfb4e836ca3ecd961903230b42830c06e;p=notmuch diff --git a/notmuch.el b/notmuch.el index d180fa4e..fb112f97 100644 --- a/notmuch.el +++ b/notmuch.el @@ -950,7 +950,9 @@ matching this search term are shown if non-nil. " (save-excursion (let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id)) (args (if query-context (append basic-args (list "and (" query-context ")")) basic-args))) - (apply 'call-process args)) + (apply 'call-process args) + (when (and (eq (buffer-size) 0) query-context) + (apply 'call-process basic-args))) (notmuch-show-markup-messages) ) (run-hooks 'notmuch-show-hook) @@ -1182,7 +1184,7 @@ The tag is added to messages in the currently selected thread which match the current search terms." (interactive (list (notmuch-select-tag-with-completion "Tag to add: "))) - (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string) + (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<)))) (defun notmuch-search-remove-tag (tag) @@ -1192,7 +1194,7 @@ The tag is removed from messages in the currently selected thread which match the current search terms." (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) " and " notmuch-search-query-string) + (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id)) (notmuch-search-set-tags (delete tag (notmuch-search-get-tags)))) (defun notmuch-search-archive-thread ()