From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: patch: write-file to arbitrary target directory Date: Sun, 18 Nov 2007 08:01:24 -0500 Message-ID: References: <86r6ip7k4x.fsf@nirvana.pusto.de> <861waobh7m.fsf@nirvana.pusto.de> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1195391180 18233 80.91.229.12 (18 Nov 2007 13:06:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Nov 2007 13:06:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eduard Wiebe Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 18 14:06:26 2007 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 1Itjqn-0003ZJ-Jz for ged-emacs-devel@m.gmane.org; Sun, 18 Nov 2007 14:06:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Itjqa-00047J-77 for ged-emacs-devel@m.gmane.org; Sun, 18 Nov 2007 08:06:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ItjmA-0006Io-Ci for emacs-devel@gnu.org; Sun, 18 Nov 2007 08:01:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Itjm9-0006IN-NQ for emacs-devel@gnu.org; Sun, 18 Nov 2007 08:01:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Itjm9-0006II-H7 for emacs-devel@gnu.org; Sun, 18 Nov 2007 08:01:25 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Itjm9-00014P-8R for emacs-devel@gnu.org; Sun, 18 Nov 2007 08:01:25 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1Itjm8-0007ed-Rc; Sun, 18 Nov 2007 08:01:24 -0500 In-reply-to: <861waobh7m.fsf@nirvana.pusto.de> (message from Eduard Wiebe on Sun, 18 Nov 2007 00:11:25 +0100) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:83537 Archived-At: > The change looks useful, but there may be a problem. > > ! (let ((dir (file-name-directory (buffer-name))) > ! (file (file-name-nondirectory (buffer-name)))) > > DIR will nearly always be nil, because buffer names normally > do not include directory parts. Not necessarily. With 'ido' package user can create buffers with arbitrary names. Of course one can do so. My point is that the normal practice is not to put the directory name in the buffer name. Does this change have any effect on that usual case? And if DIR is nil, read-file-name use 'default-directory' anyway. (If i am not mistaken.) Please double-check. If it works right for that reason, there should be a comment to explain.