Raymond Toy writes:
> >>>>> "Pascal" == Pascal Bourguignon <[EMAIL PROTECTED]> writes:
> 
>     Pascal> % cmucl -noinit
>     Pascal> CMU Common Lisp 19c (19C), running on thalassa
>     Pascal> With core: /local/languages/cmucl-19c/lib/cmucl/lib/lisp.core
>     Pascal> Dumped on: Thu, 2005-11-17 15:12:58+01:00 on lorien
>     Pascal> See <http://www.cons.org/cmucl/> for support information.
>     Pascal> Loaded subsystems:
>     Pascal>     Python 1.1, target Intel x86
>     Pascal>     CLOS based on Gerd's PCL 2004/04/14 03:32:47
>     Pascal> * (setf (logical-pathname-translations "PACKAGES") nil)
> 
> 
>     Pascal> NIL
>     Pascal> * (setf (logical-pathname-translations "PACKAGES")
>     Pascal>       (list
>     Pascal>        (LIST
>     Pascal>         (make-pathname
>     Pascal>          :host "PACKAGES"
>     Pascal>          :directory '(:absolute 
>     Pascal>                       "COM" "INFORMATIMAGO" #-cmu #|Un gros 
> bug!|#"COMMON-LISP"
>     Pascal>                       :wild-inferiors)
>     Pascal>          :name :wild :type :wild :version :wild)
>     Pascal>         (make-pathname
>     Pascal>          :directory (append 
>     Pascal>                      (let ((d (pathname-directory 
> *DEFAULT-PATHNAME-DEFAULTS*)))
>     Pascal>                        (or d '(:relative)))
>     Pascal>                      '(:wild-inferiors))
>     Pascal>          :name :wild :type :wild :version :wild))))
> 
>     Pascal> ((#P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*" #P"**/*.*.~*~"))
>     Pascal> * (defun print-pathname (p)
>     Pascal>   (format t "~&~{~{~@(~9A~) : ~S~&~}~}"
>     Pascal>           (mapcar (lambda (name field) (list name (funcall field 
> p)))
>     Pascal>                   '(host device directory name type version)
>     Pascal>                   '(pathname-host pathname-device 
> pathname-directory
>     Pascal>                     pathname-name pathname-type 
> pathname-version)))
>     Pascal>   p)
> 
> [snip]
> 
>     Pascal> * (translate-logical-pathname 
> "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP")
> 
>     Pascal> #P"/common-lisp/utility.lisp"
> 
> What exactly is the issue here?  I don't follow.  Where is the
> relative pathname?

Sorry. 

The translation for PACKAGES maps an absolute logical pathname:

   (#P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*" 

to a relative physical pathname:

                                             #P"**/*.*.~*~")

Unfortunately, when I translate a pathname:
 
   (translate-logical-pathname
          "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP")

I get an absolute pathname: 

   #P"/common-lisp/utility.lisp"

I wanted:

   #P"common-lisp/utility.lisp"



(I would have been happy too if the relative physical pathname generated by:

       (make-pathname
          :directory (append 
                      (let ((d (pathname-directory 
*DEFAULT-PATHNAME-DEFAULTS*)))
                        (or d '(:relative)))
                      '(:wild-inferiors))
          :name :wild :type :wild :version :wild))))

 would have been #P"./**/*.*.~*~"  to more clearly mark the _relative_ property
 and the translated path: #P"./common-lisp/utility.lisp",
 but the equivalent #P"common-lisp/utility.lisp" would be enough).




-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
I need a new toy.
Tail of black dog keeps good time.
Pounce! Good dog! Good dog!


Reply via email to