unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: rename-file
Date: Thu, 27 Aug 2009 14:18:03 +0200	[thread overview]
Message-ID: <m3tyztcux0.fsf@hase.home> (raw)
In-Reply-To: <871vmxebsm.fsf@escher.local.home> (Stephen Berman's message of "Thu, 27 Aug 2009 13:28:09 +0200")

Stephen Berman <stephen.berman@gmx.net> writes:

> On Thu, 27 Aug 2009 12:21:36 +0200 Andreas Schwab <schwab@linux-m68k.org> 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.

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




  parent reply	other threads:[~2009-08-27 12:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 16:05 rename-file Sam Steingold
2009-08-26 18:58 ` rename-file Stephen Berman
2009-08-27  3:16   ` rename-file Stefan Monnier
2009-08-27  8:38     ` rename-file Stephen Berman
2009-08-27  9:09       ` rename-file Andreas Schwab
2009-08-27 10:01         ` rename-file Stephen Berman
2009-08-27 10:21           ` rename-file Andreas Schwab
2009-08-27 11:28             ` rename-file Stephen Berman
2009-08-27 11:50               ` rename-file Miles Bader
2009-08-27 14:59                 ` rename-file Stephen Berman
2009-08-27 12:18               ` Andreas Schwab [this message]
2009-08-27 17:08       ` rename-file Stefan Monnier
2009-08-26 19:21 ` rename-file Stefan Monnier
2009-08-26 20:20   ` rename-file Lennart Borgman
2009-08-26 20:35   ` rename-file Sam Steingold
2009-08-27  3:15     ` rename-file Eli Zaretskii
2009-08-27  3:25     ` rename-file Richard Stallman
2009-08-27  3:41       ` rename-file Sam Steingold
2009-08-27 17:11         ` rename-file Stefan Monnier
2009-08-29  0:46         ` rename-file Richard Stallman
2009-08-31 22:09           ` rename-file Sam Steingold
2009-08-27 14:47     ` rename-file Sam Steingold
2009-08-26 20:42 ` rename-file martin rudalics
2009-08-27 13:49 ` rename-file Daniel Colascione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tyztcux0.fsf@hase.home \
    --to=schwab@linux-m68k.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).