From: Geoffrey King
Subject: (make-pathname :name "/root") - good/bad?
Date: 
Message-ID: <442b9b4d$0$7599$afc38c87@news.optusnet.com.au>
In LispWorks:
(make-pathname :name "root")  ; --> #p"root"
(make-pathname :name "/root")  ; --> #p"/root"

In CLISP (windows):
(make-pathname :name "root")  ; --> #p"root"
(make-pathname :name "/root")  ; --> error

The error is:
*** - MAKE-PATHNAME: illegal :NAME argument "/root"

If it makes a difference i don't have a directory called /root.

Which is the correct behaviour?

From: Tim Bradshaw
Subject: Re: (make-pathname :name "/root") - good/bad?
Date: 
Message-ID: <1143738961.872909.180060@j33g2000cwa.googlegroups.com>
Geoffrey King wrote:
> In LispWorks:
> (make-pathname :name "root")  ; --> #p"root"
> (make-pathname :name "/root")  ; --> #p"/root"
>
> In CLISP (windows):
> (make-pathname :name "root")  ; --> #p"root"
> (make-pathname :name "/root")  ; --> error
>
> The error is:
> *** - MAKE-PATHNAME: illegal :NAME argument "/root"
>
> If it makes a difference i don't have a directory called /root.
>
> Which is the correct behaviour?

I think CLISP is closer to correct, at least on Unix: the name
component of a pathname is generally interpreted as the name part of a
file, as distinct from any directory part and on Unix file names in
this sense can't contain slashes.  But they can on other systems, so it
depends on a lot of factors.  If you want to convert a namestring into
a pathname object it's generally better to use PARSE-NAMESTRING or the
PATHNAME function, and let the system decide what parts are what.

(a clearer example of why what you're trying to do is going to lead to
bad things is something like:

   (make-pathname :directory (:absolute "usr" "local") :name "/foo")

)

--tim
From: Christophe Rhodes
Subject: Re: (make-pathname :name "/root") - good/bad?
Date: 
Message-ID: <sqr74kqp8o.fsf@cam.ac.uk>
Geoffrey King <··············@optushome.com.au> writes:

> In LispWorks:
> (make-pathname :name "root")  ; --> #p"root"
> (make-pathname :name "/root")  ; --> #p"/root"
>
> In CLISP (windows):
> (make-pathname :name "root")  ; --> #p"root"
> (make-pathname :name "/root")  ; --> error
>
> Which is the correct behaviour?

They are both correct.

Christophe
From: Petter Gustad
Subject: Re: (make-pathname :name "/root") - good/bad?
Date: 
Message-ID: <8764lw9q0n.fsf@filestore.home.gustad.com>
Geoffrey King <··············@optushome.com.au> writes:

> Which is the correct behaviour?

Maybe you want:

(make-pathname :directory '(:absolute) :name "root") --> #p"/root"

Petter
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Harald Hanche-Olsen
Subject: Re: (make-pathname :name "/root") - good/bad?
Date: 
Message-ID: <pcohd5fztb1.fsf@shuttle.math.ntnu.no>
+ Geoffrey King <··············@optushome.com.au>:

| In CLISP (windows):
| (make-pathname :name "root")  ; --> #p"root"
| (make-pathname :name "/root")  ; --> error
|
| The error is:
| *** - MAKE-PATHNAME: illegal :NAME argument "/root"
|
| If it makes a difference i don't have a directory called /root.

In addition to the other responses, I may add that, if you really want
this pathname to point to a directory called root as opposed to an
ordinary file of that name, you probably want this:

(make-pathname :directory (list :absolute "root")) ; => #P"/root/"

That said, you may also wish to look at Peter Seibel's portable
pathname library:

http://gigamonkeys.com/book/practical-a-portable-pathname-library.html

That is, if you're trying to solve a real-world problem rather than
just asking academic questions about standards conformance.  8-)

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell