|
Using filenames which contain wildcard characters: msg#00125lisp.clisp.general
Marco Antoniotti wrote: >According to the CLHS (not directly), an implementation should provide >an implementation dependent way of quoting the implementation dependent >wild characters in the pathname component and/or namestring. Here is >the relevant bit. > 19.2.2.1.1 Special Characters in Pathname Components >Strings in pathname component values never contain special characters >that represent separation between pathname fields, such as slash in >Unix filenames. I do not think that this passage is relevant. It's about file system special characters, while the matter at hand is about a CLISP-specific and internal extension about "*" and "?", but acknowledged in CLHS as "implementation dependent special wildcard characters" (cf. ?19.2.2.3) What I believe is as follows: This topic (annoying behaviour of CLISP) is bound to disappear. It's an ancient CLISP bastion which is going to fall the more users complain about it, like two others did fall in the past, due to user complaints: - ".emacs" to be parsed as either :name ".emacs" or :name nil/"" :type "emacs" cf. custom:*parse-namestring-dot-file* - merge-pathname (:relative "foo") (:relative "bar") either fill :directory or append cf. custom:*merge-pathnames-ansi* I believe some people do use CLISP for scripting. I'm quite surprised that they haven't complained yet (often enough) about CLISP's inability to access any regular file that may be found in a file system. BTW, CLISP's impnotes still mentions the old ".dot-file" behaviour in various parts of section "Pathname components", and *parse-namestring-dot-file* doesn't seem mentioned. So maybe OPEN, TRUENAME etc. should just check against presence of :wild or :wild-inferiors, not against #\* or #\?, while DIR and DIRECTORY could maintain their portable-across-clisp pattern matching behaviour. But then, you must also suggest conforming behaviour for wild-pathname-p and ?19.2.2.3 http://www.lisp.org/HyperSpec/Body/sec_19-2-2-3.html Please suggest a custom:*nice-name* and convince Sam :-) BTW, why doesn't this work: [75]> (make-pathname :directory '(:absolute :wild) :name "foo") *** - MAKE-PATHNAME: illegal :DIRECTORY argument (:ABSOLUTE :WILD) -- I'd expect #p"*/foo" while this is accepted (which I consider equivalent): (make-pathname :directory '(:absolute "*") :name "foo") as well as(!): (make-pathname :directory '(:absolute :wild-inferiors) :name "foo") -> #p"**/foo" Regards, Jorg Hohle. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: :malloc-free allocation -- here: instance methods: 00125, Hoehle, Joerg-Cyril |
|---|---|
| Next by Date: | Re: OPEN problem on Cygwin.: 00125, Kaz Kylheku |
| Previous by Thread: | Re: Using filenames which contain wildcard charactersi: 00125, Marco Antoniotti |
| Next by Thread: | Re: Please try out FFI speed improvement: 00125, Hoehle, Joerg-Cyril |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |