Subject: [clisp-list] pathname problems

From: Stig E Sandoe <[email-masked]>
Date: Mon, 9 Jul 2001 01:53:42 +0200

hi,

I am trying to get a recent clisp cvs version working with 
common-lisp-controller on Debian but run into an issue which
I find odd.  Maybe someone can explain what is correct:

stig@palomba(21:35)[~] 710> clisp -norc -q -ansi
[1]> (load "/etc/clisprc")
;; Loading file /etc/clisprc ...
;;  Loading file /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp ...
;;  Loading of file /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp is finished.
;; Loading of file /etc/clisprc is finished.
T
[2]> (logical-pathname-translations "cl-systems")
((#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL
     :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "SYSTEM" :VERSION NIL)
  #P"/usr/share/common-lisp/systems/**/.system")
 (#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME NIL :TYPE "SYSTEM" :VERSION NIL)
  #P"/usr/share/common-lisp/systems/**/.system"))
[3]> (make-pathname :host "CL-SYSTEMS" :device nil :directory '(:absolute) :name "clocc-port" :type 
"system" :version nil)
#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL :DIRECTORY (:ABSOLUTE)
   :NAME "clocc-port" :TYPE "system" :VERSION NIL)
[4]> (namestring *)

*** - TRANSLATE-LOGICAL-PATHNAME: No replacement rule for 
#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL :DIRECTORY (:ABSOLUTE)
   :NAME "clocc-port" :TYPE "system" :VERSION NIL) is known.
1. Break [5]> 
[6]> (merge-pathnames "cl-systems:" "metering.system")
#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL :DIRECTORY (:ABSOLUTE)
   :NAME "METERING" :TYPE "SYSTEM" :VERSION :NEWEST)
[7]> (namestring *)
"/usr/share/common-lisp/systems/metering.system"
[8]> (merge-pathnames "cl-systems:" #p"metering.system")
#S(LOGICAL-PATHNAME :HOST "CL-SYSTEMS" :DEVICE NIL :DIRECTORY (:ABSOLUTE)
   :NAME "METERING" :TYPE "SYSTEM" :VERSION :NEWEST)
[9]> (namestring *)
"/usr/share/common-lisp/systems/metering.system"

is there any reason why the translation at [4] should blow up?  I've
also tested with version :newest but no effect. 

[This message was postponed and I later found that things depended
 on :TYPE being upper-case.. any particular reason?  Seems non-intuitive
 to me at least. ]

-- 
------------------------------------------------------------------
Stig Erik Sandoe     [email-masked]    http://www.ii.uib.no/~stig/

---

From: Christophe Rhodes <[email-masked]>
Date: Mon, 9 Jul 2001 09:03:20 +0100

>  on :TYPE being upper-case.. any particular reason?  Seems non-intuitive

If you look at your translations, you have a translation for :type
"SYSTEM", but not for :type "system".

Since filenames are in principle case-sensitive (and since we're in
:case :common, :type "SYSTEM" corresponds to a physical extension of
".system" on Unix), there's no real reason other than intuition to
expect a translation for :type "system" to automagically appear.

I think, anyway; this is too early on a Monday morning to be reasoning
about logical pathnames...

Cheers,

Christophe
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar 
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)