From: Francis Leboutte
Subject: Which make-pathname function is broken?
Date: 
Message-ID: <35a187e0.4617209@news.skynet.be>
Hello,

This a question about the use of the :defaults argument in make-pathname
when the :directory argument is a relative directory.

(make-pathname
  :defaults (make-pathname :directory '(:absolute "a-better-acl"))
  :directory '(:relative "five"))

With ACL4W :
 #P"\\a-better-acl\\five\\"

With ACL5 beta, the 
 #p"five\\"

Here are some relevant excerpts from the CL-hyper-spec:
----
Function MAKE-PATHNAME 
Syntax:
make-pathname &key host device directory name type version defaults case
=> pathname
...
After the components supplied explicitly by host, device, directory,
name, type, and version are filled in, the merging rules used by
merge-pathnames are used to fill in any unsupplied components from the
defaults supplied by defaults.
...


Function MERGE-PATHNAMES 
Syntax:
merge-pathnames pathname &optional default-pathname default-version
=> merged-pathname
...
If pathname does not specify a host, device, directory, name, or type,
each such component is copied from default-pathname. If pathname does
not specify a name, then the version, if not provided, will come from
default-pathname, just like the other components.
...
Pathname merging treats a relative directory specially. If
(pathname-directory pathname) is a list whose car is :relative, and
(pathname-directory default-pathname) is a list, then the merged
directory is the value of

 (append (pathname-directory default-pathname)
         (cdr  ;remove :relative from the front
           (pathname-directory pathname)))
----

I suppose that the implementors of ACL4W have applied the special treat of
a relative directory, as stated in the merge-pathnames specification (which
I consider the right choice - intuitively). The implementors of ACL will
say that `unsupplied' is the key word in the make-pathname specification
(thus in my example, because there is a :directory argument, the directory
component of the :defaults argument has to be ignored).

Thanks in advance for any comments.
Francis
--
Francis Leboutte
··········@skynet.be ········@acm.org  http://users.skynet.be/algo
Marre du courrier non sollicit� (spam)? Visitez http://www.cauce.org
From: Erik Naggum
Subject: Re: Which make-pathname function is broken?
Date: 
Message-ID: <3108454610901449@naggum.no>
* Francis Leboutte
| This a question about the use of the :defaults argument in make-pathname
| when the :directory argument is a relative directory.

  we've been around this one before, and the emerging consensus was that
  MAKE-PATHNAME creates a new pathname object from the supplied parameters
  directly as specified, and that only the unsupplied arguments are taken
  from the DEFAULTS argument.  therefore, if you supply a DIRECTORY
  argument to MAKE-PATHNAME, it is immaterial what the DIRECTORY component
  of the DEFAULTS argument is.

  initially, I had the same intuitive understanding as you do, but then I
  received an intuition upgrade, a.k.a. experience of enlightenment.  :)

  conclusion: ACL 5.0.beta is correct, and ACL4W is broken.

#:Erik
-- 
  http://www.naggum.no/spam.html is about my spam protection scheme and how
  to guarantee that you reach me.  in brief: if you reply to a news article
  of mine, be sure to include an In-Reply-To or References header with the
  message-ID of that message in it.  otherwise, you need to read that page.