i observe that logical pathname translation patterns are canonicalized:

 > *tmp*

#.(logical-pathname "XML:CODE;BASE;PARAMETERS.bin")
 > (inspect *tmp*)

#.(logical-pathname "XML:CODE;BASE;PARAMETERS.bin") is a structure.
0. HOST: #<LOGICAL-HOST>
1. DEVICE: UNSPECIFIC
2. DIRECTORY: (ABSOLUTE CODE BASE)
3. NAME: PARAMETERS
4. TYPE: bin
5. VERSION: NIL
 > 0

#<COMMON-LISP::LOGICAL-HOST> is a structure.
0. PARSE: #<Function COMMON-LISP::PARSE-LOGICAL-NAMESTRING {1008F4D1}>
1. UNPARSE: #<Function COMMON-LISP::UNPARSE-LOGICAL-NAMESTRING 
{100C4061}>
2. UNPARSE-HOST: #<Function "DEFSTRUCT LOGICAL-HOST" {1008ECF9}>
3. UNPARSE-DIRECTORY: #<Function COMMON-LISP::UNPARSE-LOGICAL-DIRECTORY
                         {100C36C9}>
4. UNPARSE-FILE: #<Function COMMON-LISP::UNPARSE-UNIX-FILE {1009F409}>
5. UNPARSE-ENOUGH: #<Function COMMON-LISP::UNPARSE-ENOUGH-NAMESTRING 
{100C27D9}>
6. CUSTOMARY-CASE: UPPER
7. NAME: XML
8. TRANSLATIONS: ((bnfp;**;*.*.* xml:root;atn-parser;**;*.*.*)
                   (**;*.BIN.* XML:ROOT;BIN;CMUCLFASL;*.FASL.*)
                   (**;*.bin.* XML:ROOT;BIN;CMUCLFASL;*.FASL.*)
                   (code;**;*.*.* xml:root;code;**;*.*.*)
                   (root;**;*.*.* /house/janson/cl-xml-cmucl/**/*.*.~*~)
                   (**;*.bnf.* xml:root;bnf;*.*.*) (**;*.*.* 
xml:root;**;*.*.*))
9. CANON-TRANSLS: ((XML:BNFP;**;*.*.* XML:ROOT;ATN-PARSER;**;*.*.*)
                    (XML:**;*.BIN.* XML:ROOT;BIN;CMUCLFASL;*.FASL.*)
                    (XML:**;*.BIN.* XML:ROOT;BIN;CMUCLFASL;*.FASL.*)
                    (XML:CODE;**;*.*.* XML:ROOT;CODE;**;*.*.*)
                    (XML:ROOT;**;*.*.* 
/house/janson/cl-xml-cmucl/**/*.*.~*~)
                    (XML:**;*.BNF.* XML:ROOT;BNF;*.*.*)
                    (XML:**;*.*.* XML:ROOT;**;*.*.*))


on the other hand, the argument pathnames for 
translate-logical-pathname are not always canonicalized.

 > *tmp*

#.(logical-pathname "XML:CODE;BASE;PARAMETERS.bin")
 > (translate-logical-pathname *tmp*)
   ;; does not work
#p"/house/janson/cl-xml-cmucl/code/base/parameters.BIN"
 > (translate-logical-pathname #.(logical-pathname 
"XML:CODE;BASE;PARAMETERS.bin"))
  ;; does work
#p"/house/janson/cl-xml-cmucl/bin/cmuclfasl/parameters.fasl"
 > (translate-logical-pathname (make-pathname :type "bin" :defaults 
*tmp*))
   ;; does not work
#p"/house/janson/cl-xml-cmucl/code/base/parameters.BIN"
 > (translate-logical-pathname (make-pathname :type "BIN" :defaults 
*tmp*))
  ;; does work
#p"/house/janson/cl-xml-cmucl/bin/cmuclfasl/parameters.fasl"


is there some logic behind this.? does proper practice require that 
that all arguments are upcased before attempting logical pathname 
operations? (note above that an attempt to provide both upper- and 
lowercase patterns was canonicalized away.)

...


Reply via email to