Subject: [clisp-list] clisp & logical pathnames revisited

From: Sam Steingold <[email-masked]>
Date: 15 Feb 2000 14:05:59 -0500

[2]> (setf (logical-pathname-translations "clocc")
      '(("**;*" "/usr/local/src/clocc/**/*")))
((#S(LOGICAL-PATHNAME :HOST "CLOCC" :DEVICE NIL
       :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL
       :VERSION NIL
    )
    "/usr/local/src/clocc/**/*"
))
[3]> (setf (logical-pathname-translations "cllib")
      '(("**;*" "clocc:src;cllib;**;*")))
((#S(LOGICAL-PATHNAME :HOST "CLLIB" :DEVICE NIL
       :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL
       :VERSION NIL
    )
    "clocc:src;cllib;**;*"
))
[4]> (translate-logical-pathname "cllib:base")
 
*** - TRANSLATE-PATHNAME: replacement pieces ((:DIRECTORY) "base" NIL NIL) do not fit into #P"clocc:src;cllib;**;*"
1. Break [5]> 

what's wrong?

(works with cmucl)

-- 
Sam Steingold (http://www.podval.org/~sds)
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
Whether pronounced "leenooks" or "line-uks", it's better than Windows.

---

From: Bruno Haible <[email-masked]>
Date: Tue, 15 Feb 2000 20:28:18 +0100 (MET)

> *** - TRANSLATE-PATHNAME: replacement pieces ((:DIRECTORY) "base" NIL NIL) do not fit into #P"clocc:src;cllib;**;*"

(type-of '#P"clocc:src;cllib;**;*")  ==>  PATHNAME not LOGICAL-PATHNAME

The pathname you gave was a simple string. With clisp, when you want a
logical pathname, you have to say it explicitly:

(setf (logical-pathname-translations "cllib")
      `(("**;*" ,(logical-pathname "clocc:src;cllib;**;*"))))
                  ================

Bruno