[Top][All Lists]
[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: |
Tue, 23 Jan 2007 17:48:54 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Jay Belanger <address@hidden> writes:
> address@hidden (Michaël Cadilhac) writes:
>
>> David Kastrup <address@hidden> writes:
>>
>>> If I do
>>> C-x C-f somefile.txt RET C-x C-s
>>> in order to create and save an empty file, Emacs replies
>>>
>>> No changes need to be saved
>>>
>>> and does not actually save the file, even though saving the file would
>>> change the state on disk.
>>
>> I can't reproduce it.
>
> I can, even with emacs -Q.
I think Michaël assumed that I meant to open an _existing_ file. That
does not make sense in connection with my report, but when just
glancing over it, one might make this mistake.
> It seems natural, if possibly incorrect, behavior.
> If this is regarded as a bug, I would expect that an unchanged empty
> file would be treated as a special case for C-xC-s.
This is more about an unchanged _new_ file (it need not be empty if
some template mechanism has filled in material already, and it is ok
not to save if the empty file existed already).
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.
--
David Kastrup
- Re: Creating an empty file, Jay Belanger, 2007/01/23
- Re: Creating an empty file,
David Kastrup <=
- Re: Creating an empty file, Jay Belanger, 2007/01/23
- Re: Creating an empty file, David Kastrup, 2007/01/23
- Re: Creating an empty file, Michaël Cadilhac, 2007/01/23
- Re: Creating an empty file, David Kastrup, 2007/01/23
- Re: Creating an empty file, Stefan Monnier, 2007/01/23
- Re: Creating an empty file, martin rudalics, 2007/01/24
- Re: Creating an empty file, Giorgos Keramidas, 2007/01/24
- Re: Creating an empty file, Kevin Rodgers, 2007/01/25
- Re: Creating an empty file, Romain Francoise, 2007/01/25
- Re: Creating an empty file, Stefan Monnier, 2007/01/25