[Openmcl-devel] A Solution to "Another pathname question"

Gary King gwking at cs.umass.edu
Sun Feb 29 07:28:40 PST 2004


In case anyone was wondering, here is a work around to my latest  
pathname problem.

Here is the new version of the file one.lisp:

(in-package common-lisp-user)

(setf (logical-pathname-translations "foo")
      `(("**;*.*"
        ,(make-pathname :host (pathname-host *load-truename*)
                        :directory (append (pathname-directory  
*load-truename*)
                                           '(:wild-inferiors))
                        :name :wild :type :wild))))

;;; note that we translate the pathname here rather than just using  
"foo:"
(let ((*default-pathname-defaults* (translate-logical-pathname  
#P"foo:")))
   (load "two"))

If "foo:" is used as the defaults, then (under OpenMCL),  
string-to-pathname is called with a unix like pathname and a logical  
host for the defaults and it considers this to be in bad taste.

I'm not sure if this is a bug in OpenMCL (and SBCL and LispWorks...) or  
a bug in my understanding. It seems to me like I ought to be able to  
set *default-pathname-defaults* to a logical host...

Hope everyone is enjoying their weekends...


On Feb 26, 2004, at 10:48 AM, Gary King wrote:

> I have two files named "one.lisp" and "two.lisp". Here they are:
>
> one.lisp
> (in-package common-lisp-user)
>
> (setf (logical-pathname-translations "foo")
>       `(("foo:**;*.*"
>          ,(make-pathname
>            :name :wild
>            :type :wild
>            :directory (append (pathname-directory (load-pathname))
>                               (list :wild-inferiors))))))
>
> (let ((*default-pathname-defaults* #P"foo:"))
>   (load "two"))
>
> two.lisp
> (in-package common-lisp-user)
>
> (print "HI HO")
>
> I've placed them in the same directory. Now my hope was that when I  
> load one, it will load two. This works under MCL. It does not,  
> however, work under LispWorks, OpenMCL, etc. Under OpenMCL, I get the  
> following error:
>
> ? (load "one.lisp")
> > Error in process listener(1): Illegal logical namestring  
> "/Volumes/Users/gwking/Applications/MCL-5.1b1/test/two.lisp"
> > While executing: CCL::STRING-TO-PATHNAME
>
> Under LispWorks, I get:
>
> Error: Parsing of logical pathname "/.automount/*/root/**/*" failed at  
> index 0 (#\/).
>   1 (continue) Try loading two again.
>   ...
>
> Obviously, I'm confused. Help appreciated.
> --  
> Gary Warren King, Lab Manager
> EKSL East, University of Massachusetts * 413 577 0176
>
> [neoconservations] forget the first principle of open society: namely,  
> that we may be wrong.
>   -- George Soros in a TPM interview  
> (http://www.talkingpointsmemo.com/archives/ 
> week_2004_01_18.html#002456)
-- 
Gary Warren King, Lab Manager
EKSL East, University of Massachusetts * 413 577 0176

Many that live deserve death. And some die that deserve life. Can you  
give that to them? Then be not too eager to deal out death in the name  
of justice, fearing for your own safety. Even the wise cannot see all  
ends.
   -- Gandalf, the Two Towers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3250 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20040229/a3b83aac/attachment.bin>


More information about the Openmcl-devel mailing list