From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Emacs and Squiggles as filenames Date: Mon, 11 Jul 2005 09:53:18 +0200 Message-ID: <85br59aidt.fsf@lola.goethe.zz> References: <87ll4iph80.fsf@gnufans.net> <8564vjhxjw.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121069028 8444 80.91.229.2 (11 Jul 2005 08:03:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2005 08:03:48 +0000 (UTC) Cc: deego@gnufans.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 11 10:03:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DrtGI-0002Dm-PF for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2005 10:03:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrtCm-00026F-P0 for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2005 03:59:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DrtAx-0001mz-13 for emacs-devel@gnu.org; Mon, 11 Jul 2005 03:58:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DrtAs-0001lR-7n for emacs-devel@gnu.org; Mon, 11 Jul 2005 03:57:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrtAq-0001kT-US for emacs-devel@gnu.org; Mon, 11 Jul 2005 03:57:57 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DrtDl-0007u4-Se for emacs-devel@gnu.org; Mon, 11 Jul 2005 04:00:57 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1Drt3X-0002Xd-DQ; Mon, 11 Jul 2005 03:50:23 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 203FF1C3C783; Mon, 11 Jul 2005 09:53:18 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Mon, 11 Jul 2005 01:34:57 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:40761 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40761 "Richard M. Stallman" writes: > >> (expand-file-name (file-name-nondirectory fname) dir) > >> > >> > >> should return fname back. It is like an identity, right? If not, > >> what is the way to *always* correctly do an expand-file-name ? > > > > This works for me: > > (concat (file-name-as-directory "~/tmp") > > (file-name-nondirectory "~/tmp/~")) > > I am afraid that the former version is _so_ ingrained into Elisp code > that we should add advice into DOC strings and Elisp manual. > > It is not just frequent, it is what we have always called "the right > way". Using concat has been slightly deprecated, partly because it > won't work in the case where the directory name fails to end in a > slash. Can't happen when file-name-as-directory is used, right? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum