From: Glenn Morris <rgm@gnu.org>
To: 23671-done@debbugs.gnu.org
Subject: bug#23671: 25.0.94; recover-this-file error
Date: Wed, 01 Mar 2017 18:31:14 -0500 [thread overview]
Message-ID: <6pa894lgl9.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87r3ch5epx.fsf@aol.com> (Live System User's message of "Wed, 01 Jun 2016 07:30:02 -0400")
Version: 26.1
Live System User wrote:
> I saw a message from Emacs that I could recover a file. I switched to
> another buffer to check out something but didn't switch back when I
> invoked `recover-this-file' and got the error:
>
> Wrong type argument: stringp, nil
commit 8244357
Date: Wed Mar 1 18:29:48 2017 -0500
Small recover-this-file improvement
* lisp/files.el (recover-this-file): Explicit error if not
visiting a file. (Bug#23671)
diff --git a/lisp/files.el b/lisp/files.el
index 7c9271e..c7de445 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5838,6 +5838,8 @@ an auto-save file."
(defun recover-this-file ()
"Recover the visited file--get contents from its last auto-save file."
(interactive)
+ (or buffer-file-name
+ (user-error "This buffer is not visiting a file"))
(recover-file buffer-file-name))
(defun recover-file (file)
prev parent reply other threads:[~2017-03-01 23:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 11:30 bug#23671: 25.0.94; recover-this-file error Live System User
2017-03-01 23:31 ` Glenn Morris [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6pa894lgl9.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=23671-done@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.