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

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

Re: Quitting `save-buffer' loses backup file


From: Sven Joachim
Subject: Re: Quitting `save-buffer' loses backup file
Date: Fri, 30 Dec 2005 11:40:30 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051017)

Richard M. Stallman wrote:

I am not convinced this is a wrong outcome for quitting in the middle
of saving.

However, pressing C-g is a natural panic reaction when the *Warning*
buffer pops up.  And the warning says:

[...]
Select one of the following safe coding systems, or edit the buffer:
[...]

If you want to edit the buffer rather than to specify a safe coding
system, it is necessary to hit C-g to get rid of the minibuffer.

    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.

What I get is (a) but not (b).

How comes that `buffer-backed-up' is nil then, as you sayed?  This is
rather strange.  Can you please do "M-x debug-on-entry rename-file"
and tell me at which points the debugger pops up in our scenario?








reply via email to

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