Subject: Re: logical pathnames?

From: Bruno Haible <[email-masked]>
Date: Mon, 21 Dec 1998 17:58:20 +0100 (MET)

Raymond Toy <[email-masked]> wrote on clisp-devel, and I'm CCing to
clisp-list because it may affect any of you:
> 
> I tried the following example, taken from CLtL2:
> 
> (setf (logical-pathname-translations "foo") 
>       '(("**;*.*.*"          "MY-LISPM:>library>foo>**>")))
> 
> (translate-logical-pathname "foo:bar;baz;mum.quux.3") 
> 
> CLtL2 says it might return
> 
> #P"MY-LISPM:>library>foo>bar>baz>mum.quux.3"
> 
> However, Clisp says:
> 
> (translate-logical-pathname "foo:bar;baz;mum.quux.3") 
> 
> *** - TRANSLATE-PATHNAME: replacement pieces (("bar" "baz") "mum" "quux" "3") do not fit into #"MY-LISPM:>library>foo>**>" 
> 
> Actually, it fails for everything I've tried, so I may be totally
> confused here.

Try (describe '#"MY-LISPM:>library>foo>**>"). It shows you that this is
a pathname with empty directory and name = "MY-LISPM:>library>foo>**>".
(It's a valid Unix pathname, isn't it?)

You probably meant to write down a logical pathname. In CLISP, you need
to call the function LOGICAL-PATHNAME to get one.

> (logical-pathname "MY-LISPM:>library>foo>**>")
*** - PARSE-NAMESTRING: syntax error in filename "MY-LISPM:>library>foo>**>"
at position 9

Hmm, your pathname looks more like a MacOS or TOPS-20 pathname, not a logical
pathname.

Bruno