emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#29179: closed ([PATCH] teach recover-file about au


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#29179: closed ([PATCH] teach recover-file about autosave files not existing)
Date: Fri, 24 Nov 2017 09:03:02 +0000

Your message dated Fri, 24 Nov 2017 11:01:28 +0200
with message-id <address@hidden>
and subject line Re: bug#29179: [PATCH] teach recover-file about autosave files 
not existing
has caused the debbugs.gnu.org bug report #29179,
regarding [PATCH] teach recover-file about autosave files not existing
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
29179: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29179
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] teach recover-file about autosave files not existing Date: Mon, 06 Nov 2017 15:22:46 -0600 User-agent: mu4e 0.9.18; emacs 25.3.1
Currently running M-x recover-this-file when an autosave file doesn't exist 
reports that the autosave file is not current. This changes it so that it'll 
correctly tell you that the autosave file doesn't exist.

Alex

------------------------------------------------------------

>From f0b3de73ba72ada91c3efe2d150b606d35ca4e5c Mon Sep 17 00:00:00 2001
From: Alex Branham <address@hidden>
Date: Mon, 6 Nov 2017 15:17:40 -0600
Subject: [PATCH] Add more informative error when no autosave file available

* lisp/files.el (recover-file): Distinguish between autosave file
not existing versus not being current
---
 lisp/files.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index cda2c1abd5..1bd0ba6427 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5851,7 +5851,11 @@ recover-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 "No auto save file %s found"
+                  (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.15.0

Attachment: 0001-Add-more-informative-error-when-no-autosave-file-ava.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#29179: [PATCH] teach recover-file about autosave files not existing Date: Fri, 24 Nov 2017 11:01:28 +0200
> From: Alex Branham <address@hidden>
> Date: Mon, 06 Nov 2017 15:22:46 -0600
> 
> Currently running M-x recover-this-file when an autosave file doesn't exist 
> reports that the autosave file is not current. This changes it so that it'll 
> correctly tell you that the autosave file doesn't exist.

Thanks, I pushed this to the master branch.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]