X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=9c4ee71811ed8e91b8378c96d2601533e39c5ad7;hp=3e8647db78c8710e7d3bb0926e8b52729866b3ac;hb=5382eebcdcdb50625c038c6caa89968d2f403bd1;hpb=11365abb90b63af785f5b8ad73e0cbcefc567dce;ds=sidebyside 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!"))) ;;