From: Sam S. <sd...@gn...> - 2011-05-03 22:42:46
|
Hi Bruno, > * Bruno Haible <oe...@py...t> [2011-05-04 00:23:32 +0200]: > >> "foo*" is a valid (although uncommon) pathname on most modern OSes but >> it cannot be handled by clisp easily. >> proposal: user variable *accept-wild-pathname* which will treat wild >> pathname as non-wild in OPEN, DELETE-FILE et al.: > > Very nice! thanks. what do you think about the alternative (and much more complex) proposal if allowing users to escape wildcards? >> [6]> (let ((*accept-wild-pathname* t)) (delete-file "foo*")) >> #P"/home2/sds/src/clisp/current/build-g/foo*" > > Let's go even one step further: > > (let ((*accept-wild-pathname* t)) (wild-pathname-p (pathname "foo*"))) => NIL Doesn't look right to me. > Should this variable influence the parsing of pathnames or their > interpretations in functions such as OPEN, DELETE-FILE, etc.? > It needs to influence both, because > (pathname "foo*") => #S(PATHNAME :NAME "foo*") > (pathname "foo.x*") => #S(PATHNAME :NAME "foo" :TYPE "x*") > regardless whether *accept-wild-pathname* is true. How should it influence parsing? Why? I think that if we want to touch parsing we might as well implement wildcard escaping... >> a better name for the variable? > Maybe *interpret-wildcards*, with default value t? Sounds good. -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://thereligionofpeace.com http://jihadwatch.org http://ffii.org http://honestreporting.com http://dhimmi.com http://camera.org There are two ways to write error-free programs; only the third one works. |