X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=7d9f8a905f9103e378249069948c33709daca4dd;hb=480f44fbe47a068626dbb7c7d9e9b1fb72a5da0f;hp=4d6c014b0690dc7a563dfa64286eb6c4aaedaee0;hpb=e504b56f24c291199d835aefcdb7bbb6809e8266;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 4d6c014b..7d9f8a90 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1185,6 +1185,10 @@ reset based on the original query." (let ((inhibit-read-only t) (state (unless reset-state (notmuch-show-capture-state)))) + ;; erase-buffer does not seem to remove overlays, which can lead + ;; to weird effects such as remaining images, so remove them + ;; manually. + (remove-overlays) (erase-buffer) (notmuch-show-build-buffer) (if state @@ -1901,10 +1905,16 @@ thread from search." (interactive) (notmuch-common-do-stash (notmuch-show-get-from))) -(defun notmuch-show-stash-message-id () - "Copy id: query matching the current message to kill-ring." - (interactive) - (notmuch-common-do-stash (notmuch-show-get-message-id))) +(defun notmuch-show-stash-message-id (&optional stash-thread-id) + "Copy id: query matching the current message to kill-ring. + +If invoked with a prefix argument (or STASH-THREAD-ID is +non-nil), copy thread: query matching the current thread to +kill-ring." + (interactive "P") + (if stash-thread-id + (notmuch-common-do-stash notmuch-show-thread-id) + (notmuch-common-do-stash (notmuch-show-get-message-id)))) (defun notmuch-show-stash-message-id-stripped () "Copy message ID of current message (sans `id:' prefix) to kill-ring."