emacs-devel
[Top][All Lists]
Advanced

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

Re: rename-file


From: Stephen Berman
Subject: Re: rename-file
Date: Thu, 27 Aug 2009 10:38:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

On Wed, 26 Aug 2009 23:16:08 -0400 Stefan Monnier <address@hidden> wrote:

>>> Why isn't the buffer, which is visiting a file, renamed
>>> when I rename the underlying file with rename-file?
>
>> Not only that, but subsequently doing `C-h v buffer-file-name' on that
>> buffer returns the previous name, though that file(name) no longer
>> exists.
>
> That's perfectly OK.  It's exactly as if someone had done "mv" from
> outside Emacs (or from a M-x shell buffer).  There's nothing wrong with
> such a situation.  C-x C-s will (re)create the file.

I should have left out the though-clause above, it was a misguided
afterthought.  What's problematic is that returning the previous name
contradicts the doc string of buffer-file-name: "Name of file visited in
current buffer, or nil if not visiting a file."

Steve Berman





reply via email to

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