[Top][All Lists]

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

Re: rename-file

From: Andreas Schwab
Subject: Re: rename-file
Date: Thu, 27 Aug 2009 14:18:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Stephen Berman <address@hidden> writes:

> On Thu, 27 Aug 2009 12:21:36 +0200 Andreas Schwab <address@hidden> wrote:
>>                         There can be only at most one name associated
>> with any buffer.
> Isn't it rather "exactly one file name"?  Or is it possible to have
> nameless buffers?

Sure.  See the docstring of buffer-file-name.

>>> 1. C-x C-f bla
>>> 2. C-h v buffer-file-name => bla
>>> 3. M-x rename-file RET blabla
>>> 4. C-h v buffer-file-name => bla
>>> Surely the return value in step 4 is unwanted, isn't it?
>> The visited name of the buffer didn't change in any way whatsoever.
> But that's precisely the problem!

There is no assotiation between a buffer and a file, only between a
buffer and file name.

>> Only set-visited-file-name can do that.
> Then it should be made to take effect between steps 3 and 4 above.

No.  That the filesystem changes does not in any way change the
association of a buffer to a file name, just like deleting a file does
not magically kill a buffer.


Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

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