emacs-devel
[Top][All Lists]
Advanced

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

Re: Creating an empty file


From: David Kastrup
Subject: Re: Creating an empty file
Date: Wed, 24 Jan 2007 00:56:03 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

address@hidden (Michaël Cadilhac) writes:

> Jay Belanger <address@hidden> writes:
>
>> David Kastrup <address@hidden> writes:
>> ...
>>> This would probably also apply for an existing file that has been
>>> changed on disk, but not in the Emacs buffer.  In this case it might
>>> possibly make sense to ask the "revert buffer" question before saving.
>>> In the case of a non-existing file, there is nothing to revert to,
>>> however.
>>
>> So are you suggesting that when saving a file whose buffer has not
>> been changed, that Emacs should compare it to the disk file anyhow?
>> I had always (always=for the last 10 seconds) thought that it didn't
>> for efficiency reasons.
>
> Well, the modification flag has a certain use that should be
> preserved. What may be done is to add a var
> `new-files-are-already-modified'.
>
> Maybe the (untested) following could help?

I don't think this a good idea since it will also cause Emacs to
refuse deleting the buffer without confirmation, and it will cause
autosaving to occur.

I think the current behavior is perfectly fine with regard to setting
the modification flag (or rather not setting it).  The problem rather
is that C-x C-s consults nothing except the modification flag before
deciding not to save at all, and not asking a question about it.  And
the prefix flag is already used for a different purpose, so we can't
use that to signal "I really mean it".

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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