From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: rename-file Date: Thu, 27 Aug 2009 14:18:03 +0200 Message-ID: References: <4A955D32.8030202@gnu.org> <8763ca9zbi.fsf@escher.local.home> <87d46hejn8.fsf@escher.local.home> <878wh5efts.fsf@escher.local.home> <871vmxebsm.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251375508 6396 80.91.229.12 (27 Aug 2009 12:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 12:18:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 14:18:21 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mgdvo-0005NH-E4 for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 14:18:20 +0200 Original-Received: from localhost ([127.0.0.1]:36108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mgdvn-0001Mo-M5 for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 08:18:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mgdvh-0001MY-VN for emacs-devel@gnu.org; Thu, 27 Aug 2009 08:18:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mgdvd-0001Ja-DJ for emacs-devel@gnu.org; Thu, 27 Aug 2009 08:18:13 -0400 Original-Received: from [199.232.76.173] (port=41211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mgdvd-0001JS-8x for emacs-devel@gnu.org; Thu, 27 Aug 2009 08:18:09 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:23659) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mgdvc-0007bP-SF for emacs-devel@gnu.org; Thu, 27 Aug 2009 08:18:09 -0400 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7RCI56t028438; Thu, 27 Aug 2009 08:18:05 -0400 Original-Received: from hase.home (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7RCI3sO006023; Thu, 27 Aug 2009 08:18:04 -0400 X-Yow: I have a very good DENTAL PLAN. Thank you. In-Reply-To: <871vmxebsm.fsf@escher.local.home> (Stephen Berman's message of "Thu, 27 Aug 2009 13:28:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114686 Archived-At: Stephen Berman writes: > On Thu, 27 Aug 2009 12:21:36 +0200 Andreas Schwab 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."