[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Re: Quitting `save-buffer' loses backup file]
From: |
Eli Zaretskii |
Subject: |
Re: address@hidden: Re: Quitting `save-buffer' loses backup file] |
Date: |
Fri, 06 Jan 2006 13:56:02 +0200 |
> Date: Fri, 30 Dec 2005 17:04:39 +0100
> From: Sven Joachim <address@hidden>
> To: address@hidden
> CC: address@hidden
> Subject: Re: Quitting `save-buffer' loses backup file
>
> I wrote:
>
> > Here is a summary of what Emacs does in the scenario:
> >
> > (a) Before saving bar, Emacs renames bar to bar~, overwriting the old
> > backup in the process, and sets `buffer-backed-up' to t. This is
> > documented in the manual.
> >
> > (b) Emacs tries to save bar but fails to do so, because the user quits.
> > To reduce harm, Emacs renames bar~ back to bar. But -- and this is
> > probably wrong -- Emacs does not set `buffer-backed-up' back to nil.
>
> Actually, (b) is coded and documented in the function
> basic-save-buffer-2, near the end:
>
> ,----
> | ;; If we get an error writing the new file, and we made
> | ;; the backup by renaming, undo the backing-up.
> | (and setmodes (not success)
> | (rename-file (cdr setmodes) buffer-file-name))))))
> `----
>
> What do you think of the following patch which sets `buffer-backed-up'
> back to nil here?
Thanks, I installed the second variant of your patch.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: address@hidden: Re: Quitting `save-buffer' loses backup file],
Eli Zaretskii <=