Gnus development mailing list
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: (concat "/dir/name/" "foo") --> (expand-file-name "foo" "/dir/name/")
Date: 18 Oct 2000 17:35:30 -0400	[thread overview]
Message-ID: <m366mpal3b.fsf@multivac.student.cwru.edu> (raw)
In-Reply-To: Dave Love's message of "Wed, 18 Oct 2000 18:55:22 +0100"

Dave Love <d.love@dl.ac.uk> 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



  reply	other threads:[~2000-10-18 21:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-13 20:55 Kai Großjohann
2000-10-13 21:13 ` Paul Jarc
2000-10-13 22:19   ` Kai Großjohann
2000-10-16 18:12   ` Dave Love
2000-10-16 20:39     ` Paul Jarc
2000-10-16 22:36       ` Daniel Pittman
2000-10-18 17:55       ` Dave Love
2000-10-18 21:35         ` Paul Jarc [this message]
2000-10-22 16:00           ` Dave Love
2000-10-22 18:10             ` Paul Jarc
2000-10-22 18:51               ` Kai Großjohann
2000-10-23  0:45                 ` Paul Jarc
2000-10-23  7:52                   ` Kai Großjohann
2000-10-23 15:29                     ` Paul Jarc
2000-10-19  1:11         ` Daniel Pittman
2000-10-22 16:02           ` Dave Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m366mpal3b.fsf@multivac.student.cwru.edu \
    --to=prj@po.cwru.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).