From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: rename-file Date: Thu, 27 Aug 2009 20:50:24 +0900 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> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251375065 4975 80.91.229.12 (27 Aug 2009 12:11:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 12:11:05 +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:10:58 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 1Mgdoe-0003Cu-Rg for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 14:10:57 +0200 Original-Received: from localhost ([127.0.0.1]:38292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mgdod-0002Z6-4K for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 08:10:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgdZr-0004SG-RL for emacs-devel@gnu.org; Thu, 27 Aug 2009 07:55:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgdZk-0004QT-00 for emacs-devel@gnu.org; Thu, 27 Aug 2009 07:55:37 -0400 Original-Received: from [199.232.76.173] (port=56060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgdZj-0004QA-6e for emacs-devel@gnu.org; Thu, 27 Aug 2009 07:55:31 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]:57774) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MgdUt-0008Kp-CX; Thu, 27 Aug 2009 07:50:32 -0400 Original-Received: from relay31.aps.necel.com ([10.29.19.54]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n7RBoPUt012410; Thu, 27 Aug 2009 20:50:25 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.16] [10.29.19.16]) by relay31.aps.necel.com with ESMTP; Thu, 27 Aug 2009 20:50:25 +0900 Original-Received: from dhlpc061 ([10.114.112.173] [10.114.112.173]) by relay11.aps.necel.com with ESMTP; Thu, 27 Aug 2009 20:50:24 +0900 Original-Received: by dhlpc061 (Postfix, from userid 31295) id A9F0A52E1EE; Thu, 27 Aug 2009 20:50:24 +0900 (JST) System-Type: x86_64-unknown-linux-gnu Blat: Foop In-Reply-To: <871vmxebsm.fsf@escher.local.home> (Stephen Berman's message of "Thu, 27 Aug 2009 13:28:09 +0200") Original-Lines: 25 X-detected-operating-system: by monty-python.gnu.org: Solaris 8 (1) 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:114685 Archived-At: Stephen Berman writes: > I don't understand how anyone can deny that evaluating the variable > whose value is documented as the "Name of file visited in current > buffer, or nil if not visiting a file" should return the correct current > name of the visited file. Because "rename-file" is a relatively low-level command, which just tells the OS to rename the file. If you want "smart" renaming, use dired to rename files ("R" command). It will update buffer filenames (and buffer names) accordingly. While the latter behavior is convenient, there's certainly nothing _wrong_ with the former -- there's no guarantee that a buffer's filename variable refers an existing file at all (and really there can't be, since in the general case, emacs can't keep track of what goes on in the filesystem behind its back). -Miles -- "An atheist doesn't have to be someone who thinks he has a proof that there can't be a god. He only has to be someone who believes that the evidence on the God question is at a similar level to the evidence on the werewolf question." [John McCarthy]