>>>>> "Gareth" == Gareth McCaughan <[EMAIL PROTECTED]> writes:
Gareth> On Tuesday 29 March 2005 23:23, Raymond Toy wrote:
Gareth> Possibly... As I say, my understanding of this stuff is
Gareth> pretty much at the voodoo-chicken level. :-) What I have
Gareth> seems to be pretty similar to the examples on the
Gareth> LOGICAL-PATHNAME-TRANSLATIONS page of the
Gareth> hyperspec. Is that wrong for CMU CL?
No, I guess not. It seems to work as expected. But I didn't look up
the CLHS entry for logical-pathname-translations.
Gareth> Hmm, but now I'm puzzled. If I'm reading the hyperspec
Gareth> correctly, which I'm probably not, then CMU CL's behaviour
Gareth> is nonconforming -- though the conforming behaviour wouldn't
Gareth> suit me any better :-). So:
Gareth> - #p"foo.lisp" is supposed to be the same as #.(parse-namestring
Gareth> "foo.lisp")
Gareth> - If PARSE-NAMESTRING is not given a host (i.e., if the host
argument
Gareth> is
Gareth> NIL, which it will be by default here) and the string it's
given is
Gareth> a
Gareth> syntactically valid logical pathname without a host part, then
it's
Gareth> meant to yield a logical pathname whose host is the default.
Gareth> - "foo.lisp" is a syntactically valid logical pathname without a
host
Gareth> part, no?
Gareth> - So I think #p"foo.lisp" should be a logical pathname object. But
Gareth> (see above) it's actually an object of type PATHNAME instead.
But the CLHS says
* If host is nil and thing is a syntactically valid logical
pathname namestring containing an explicit host, then it is
parsed as a logical pathname namestring.
and "foo.lisp" doesn't have an explicit host, so it's not parsed as a
logical pathname.
Also, default-pathname isn't specified so it gets the default value of
*default-pathname-defaults* which is usually a pathname. If you
change *default-pathname-defaults* to a logical pathname you should
get a logical pathname as the result. I don't know how well that
would work in practice, but it would probably expose mistakes in
CMUCL's pathname code.
Ray