[Openmcl-devel] windows host definition

Gary Byers gb at clozure.com
Mon Apr 5 17:32:23 PDT 2010


If I understand correctly, you want to do (and -should- be able to do):

(setf (logical-pathname-translations "mac-home")
       '((#p"**;*.*" #p"v:/**/*.*")))

which is approximately equivalent to the first example in the dictionary
entry for LOGICAL-PATHNAME-TRANSLATIONS.

If I understand correctly and am not hallucinating, there's been a bug
in code called by TRANSLATE-LOGICAL-PATHNAME that prevents that from
working: a pathname such as "mac-home:file.lisp" will fail to match
the left-hand-side of that rule, because the missing host component in the
rule (which should be treated as :WILD) will fail to match the pathname's
host.

You unfortunately can't say:

(setf (logical-pathname-translations "mac-home")
       '((#p"mac-home:**;*.*" #p"v:/**/*.*")))

because the host part of the namestring in the LHS hasn't been defined
yet (see 19.3.1.1.1).

Luckily, you -can- forward-reference the host being defined by using
MAKE-PATHNAME, as in:

(setf (logical-pathname-translations "mac-home")
   `((,(make-pathname :host "mac-home"
                      :directory '(:absolute :wild-inferiors)
                      :name :wild
                      :type :wild
                      :version :wild)
      #p"v:/**/*.*")))


On Sat, 27 Mar 2010, Alexander Repenning wrote:

> I am convinced this has some trivial answer.
> 
> In parallels running on a Mac I have created a shared home folder showing up
> as V: drive in Windows/Parallel on the same machine. So far so good. 
> 
> Now I like to use logical pathnames and define a "mac-home" host but how?
> 
> I canot use an existing windows host to define that new host, e.g., 
> 
> 
> (setf (logical-pathname-translations "mac-home")
>       '(("**;*.*" "home:;**;")))
> 
> 
> If I use something like "v:\\...." things do not work either. Using
> (make-pathname :device "v" .... ) may be getting closer but still no dice.
> 
> Any suggestions? This can't be really hard.
> 
> Alex
> 
> Prof. Alexander Repenning
> 
> 
> University of Colorado
> 
> Computer Science Department
> 
> Boulder, CO 80309-430
> 
> 
> vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf
> 
> 
> 
> 
>


More information about the Openmcl-devel mailing list