From ... From: Erik Naggum Subject: Re: Logical pathname hosts. Date: 1998/12/21 Message-ID: <3123192188393170@naggum.no>#1/1 X-Deja-AN: 424353302 References: <75k4tr$uom$1@nnrp1.dejanews.com> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * robert_m_miles@yahoo.com | How do I take a pathname like: | /home/rmiles/code/lisp/source/demos/foo.lisp | | and set it up so that I can do stuff like: | | (load "demo:foo.lisp") | | instead of | | (load "/home/rmiles/code/lisp/source/demos/foo.lisp") (setf (logical-pathname-translations "demo") '(("**;*.*" "/home/rmiles/code/lisp/source/demos/") (";**;*.*" "/home/rmiles/code/lisp/source/demos/"))) this sets up both absolute and relative logical pathnames (in that order) on the host DEMO to map to the same directory. under Allegro CL, you could also put this into sys:hosts.cl: "demo" '(#L"**;*.*" #P"/home/rmiles/code/lisp/source/demos/") '(#L";**;*.*" #P"/home/rmiles/code/lisp/source/demos/") or put it in some other file and register that file as a hosts map: (push (logical-pathname-translations-database-pathnames)) (#L is a pathname syntax that forces the string into a logical pathname. it turns out to be a very useful extension to the standard syntax, which would use #P in both cases. not that this wouldn't work in this case.) it is generally a good idea to separate the logical hosts setup as much as possible from your other code so you won't need to recompile anything if you move things around. after all, that's the purpose of this thing. #:Erik -- Nie wieder KrF! Nie wieder KrF! Nie wieder KrF! Nie wieder KrF!