Re: Playing with pathnames



In article <pan.2006.07.16.16.13.31.716539@xxxxxxxxxxxxxxxx>,
Pierre THIERRY <nowhere.man@xxxxxxxxxxxxxxxx> wrote:

Hi,

as I'm playing with pathnames and ASDF, I wonder why the following code:

(setf
(logical-pathname-translations "xdg-config")
'(("**;*.*.*" (merge-pathnames ".config/**/" (user-homedir-pathname)))))

triggers the following error:

The value (MERGE-PATHNAMES ".config/**/" (USER-HOMEDIR-PATHNAME))
is not of type
(OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING PATHNAME FILE-STREAM).
[Condition of type TYPE-ERROR]

Because the list you provided is quoted, so it never calls the
MERGE-PATHNAMES function. Try:

`(("**;*.*.*" ,(merge-pathnames ...)))


Although:

CL-USER> (class-of (merge-pathnames ".config/**/" (user-homedir-pathname)))
#<STRUCTURE-CLASS PATHNAME>

Now you're evaluating the MERGE-PATHNAMES expression.

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.