From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: rename-file Date: Thu, 27 Aug 2009 12:01:03 +0200 Message-ID: <878wh5efts.fsf@escher.local.home> References: <4A955D32.8030202@gnu.org> <8763ca9zbi.fsf@escher.local.home> <87d46hejn8.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 1251367312 14489 80.91.229.12 (27 Aug 2009 10:01:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 10:01:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 12:01:45 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 1Mgbnc-0005qf-RE for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 12:01:45 +0200 Original-Received: from localhost ([127.0.0.1]:57761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mgbnc-0006D1-Bc for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 06:01:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgbnV-0006Cn-5N for emacs-devel@gnu.org; Thu, 27 Aug 2009 06:01:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgbnP-0006Ca-L6 for emacs-devel@gnu.org; Thu, 27 Aug 2009 06:01:36 -0400 Original-Received: from [199.232.76.173] (port=32798 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgbnP-0006CX-CI for emacs-devel@gnu.org; Thu, 27 Aug 2009 06:01:31 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:35347) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MgbnO-0002rP-Hp for emacs-devel@gnu.org; Thu, 27 Aug 2009 06:01:30 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MgbnK-0005la-2K for emacs-devel@gnu.org; Thu, 27 Aug 2009 12:01:26 +0200 Original-Received: from i59f5518c.versanet.de ([89.245.81.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2009 12:01:26 +0200 Original-Received: from stephen.berman by i59f5518c.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2009 12:01:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: i59f5518c.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114681 Archived-At: On Thu, 27 Aug 2009 11:09:45 +0200 Andreas Schwab wrote: > Stephen Berman 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