From ed36c71a1e36b919c57cd9f1ab73210e64810fcb Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 24 Nov 2017 10:59:12 +0200 Subject: [PATCH] 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) --- lisp/files.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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" -- 2.39.2