From: Alex Branham Date: Fri, 24 Nov 2017 08:59:12 +0000 (+0200) Subject: More informative error when autosave file is not available X-Git-Tag: emacs-27.0.90~6135 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed36c71a1e36b919c57cd9f1ab73210e64810fcb;p=emacs.git More informative error when autosave file is not available * lisp/files.el (recover-file): Distinguish in error messages between autosave file not existing and not being current. (Bug#29179) --- diff --git a/lisp/files.el b/lisp/files.el index ae90d19f2f2..63dd509eab8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5881,7 +5881,11 @@ an auto-save file." (error "%s is an auto-save file" (abbreviate-file-name file))) (let ((file-name (let ((buffer-file-name file)) (make-auto-save-file-name)))) - (cond ((if (file-exists-p file) + (cond ((and (file-exists-p file) + (not (file-exists-p file-name))) + (error "Auto save file %s does not exist" + (abbreviate-file-name file-name))) + ((if (file-exists-p file) (not (file-newer-than-file-p file-name file)) (not (file-exists-p file-name))) (error "Auto-save file %s not current"