[Top][All Lists]

[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 12:01:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

On Thu, 27 Aug 2009 11:09:45 +0200 Andreas Schwab <address@hidden> wrote:

> Stephen Berman <address@hidden> writes:
>> 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."
> That's not a contradiction.  All that buffer-file-name defines is
> a relationship between a buffer and a file name, independent of the
> current meaning of that name.

If that is so, then the doc string should be changed to "A name of the
file visited in the current buffer...", to avoid confusion.  As it is, I
understand it to be equivalent to "The name of the file visited in the
current buffer..." (and indeed, "the name" is used in the comment above
the filename field of the buffer struct declaration in buffer.h), and
the name shown (after changing it with rename-file), i.e. the value of
buffer-file-name, is incorrect.  More explicitly:

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?

Steve Berman

reply via email to

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