From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32895 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: (concat "/dir/name/" "foo") --> (expand-file-name "foo" "/dir/name/") Date: 18 Oct 2000 17:35:30 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: References: <200010161812.TAA25555@djlvig.dl.ac.uk> <200010181755.SAA08846@djlvig.dl.ac.uk> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035169101 22345 80.91.224.250 (21 Oct 2002 02:58:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:58:21 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 3C58CD051E for ; Wed, 18 Oct 2000 17:37:31 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id QAB19376; Wed, 18 Oct 2000 16:36:48 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 18 Oct 2000 16:36:04 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id QAA06763 for ; Wed, 18 Oct 2000 16:35:54 -0500 (CDT) Original-Received: from multivac.student.cwru.edu (multivac.STUDENT.CWRU.Edu [129.22.239.69]) by mailhost.sclp.com (Postfix) with SMTP id 33271D051E for ; Wed, 18 Oct 2000 17:35:58 -0400 (EDT) Original-Received: (qmail 28196 invoked by uid 500); 18 Oct 2000 21:35:53 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org In-Reply-To: Dave Love's message of "Wed, 18 Oct 2000 18:55:22 +0100" Original-Lines: 35 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:32895 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:32895 Dave Love writes: > PJ> In that case, expand-file-name won't necessarily give you the > PJ> file name you want. > > I don't understand this. It sounds like cause for a bug report. Not with regard to the implementation of expand-file-name, but perhaps with various uses of it. Consider "foo/../bar". expand-file-name will normalize it to "bar", but it's possible that foo is a symlink to something other than a sibling directory. In that case, "foo/../bar" and "bar" might *both* name existing files, but not the same file. Or one might name an existing file, and the other might not. Which string names the file we actually want? In each particular case of deciding whether to use expand-file-name, you have to decide which file you would want: the file named literally by the string you've got, or the file named by the string's expansion. There is no general answer; you have to decide case by case. Also, you want to be careful not to expand an already-expanded name, if expand-file-name is indeed not necessarily idempotent. Otherwise you'll be dealing with two different filenames, when you really want to work with just one file. > PJ> Handlers aren't involved until I/O is attempted, AFAIK. > > I believe the operations listed under Info (elisp)Magic File Names > accurately reflect the code. If not, please make a bug report. I was probably mistaken there, then. I can't find that node in my manual, but the Index node is inaccessible, so maybe my manual is broken. # This Info file contains edition 2.5 of the GNU Emacs Lisp Reference # Manual, corresponding to GNU Emacs version 20.3. or is there a newer manual? paul