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 10:38:35 +0200 Message-ID: <87d46hejn8.fsf@escher.local.home> References: <4A955D32.8030202@gnu.org> <8763ca9zbi.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 1251362373 32191 80.91.229.12 (27 Aug 2009 08:39:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 08:39:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 10:39:26 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 1MgaVv-0004Zo-Va for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 10:39:24 +0200 Original-Received: from localhost ([127.0.0.1]:38155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgaVv-0000RX-8V for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 04:39:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgaVn-0000NI-Uk for emacs-devel@gnu.org; Thu, 27 Aug 2009 04:39:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgaVh-000089-Sq for emacs-devel@gnu.org; Thu, 27 Aug 2009 04:39:14 -0400 Original-Received: from [199.232.76.173] (port=37485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgaVh-00007x-PJ for emacs-devel@gnu.org; Thu, 27 Aug 2009 04:39:09 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:34995) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MgaVh-0003EX-BX for emacs-devel@gnu.org; Thu, 27 Aug 2009 04:39:09 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MgaVW-0004PF-0M for emacs-devel@gnu.org; Thu, 27 Aug 2009 10:38:58 +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 10:38:57 +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 10:38:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 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:114675 Archived-At: On Wed, 26 Aug 2009 23:16:08 -0400 Stefan Monnier 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