X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=9c4ee71811ed8e91b8378c96d2601533e39c5ad7;hb=60cd3b9a0623a1cb71a1a1eb440accf9236a41e7;hp=3e8647db78c8710e7d3bb0926e8b52729866b3ac;hpb=fb6edb08005fdae210ed4fdc6ac654db236b8ed2;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 3e8647db..9c4ee718 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -168,8 +168,14 @@ user-friendly queries." (defun notmuch-common-do-stash (text) "Common function to stash text in kill ring, and display in minibuffer." - (kill-new text) - (message "Stashed: %s" text)) + (if text + (progn + (kill-new text) + (message "Stashed: %s" text)) + ;; There is nothing to stash so stash an empty string so the user + ;; doesn't accidentally paste something else somewhere. + (kill-new "") + (message "Nothing to stash!"))) ;;