mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
emacs: stash bugfix
Currently an attempt to stash a non-existent field (eg cc when not present) throws an error. Catch this case and give the user a warning message.
This commit is contained in:
parent
11365abb90
commit
5382eebcdc
1 changed files with 8 additions and 2 deletions
|
@ -168,8 +168,14 @@ user-friendly queries."
|
||||||
|
|
||||||
(defun notmuch-common-do-stash (text)
|
(defun notmuch-common-do-stash (text)
|
||||||
"Common function to stash text in kill ring, and display in minibuffer."
|
"Common function to stash text in kill ring, and display in minibuffer."
|
||||||
|
(if text
|
||||||
|
(progn
|
||||||
(kill-new text)
|
(kill-new text)
|
||||||
(message "Stashed: %s" 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!")))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue