[Openmcl-devel] %directory-string-list fails on real Mac filenames

Gary King gwking at cs.umass.edu
Sat Mar 27 00:40:51 UTC 2004


Hi,

You're probably aware of Olin Shivers work with the Scheme shell, but 
just in case you're not, 
http://citeseer.ist.psu.edu/shivers94scheme.html is a good 
introduction. I really like the idea of a nice Lisp shell built around 
OpenMCL.

Regards,
Gary


On Mar 26, 2004, at 3:07 PM, Stonewall Ballard wrote:

> Gary,
>
> That's clearly a better idea than what I was considering, but it 
> doesn't work. It fails on a file named "11 *69.mp3", which produces:
>
> Illegal use of wildcarded filename "/Volumes/Music/iTunes 
> Music/Christine Lavin/Please Don't Make Me Too Happy/11 \\\\*69.mp3"
> While executing: NATIVE-TRANSLATED-NAMESTRING
>
> I'll take a look at this later when I have more time.
>
> BTW, I'm making an effort here to see if I can use OpenMCL as a 
> convenient scripting language. I've been using Python, but I'd rather 
> write in Lisp.
>
> Thanks.
>
>  - Stoney
>
> On Mar 26, 2004, at 12:54 AM, Gary Byers wrote:
>
>> I think that the function's used to parse directory components of
>> (possibly logical) namestrings as well, so it doesn't want to have
>> to guess what:
>>
>> "/;abc;/def/;ghi;"
>>
>> might mean.  (As the comment indicates, an explicit host - or explicit
>> lack of a host - might make this unambiguous.)
>>
>> If we're going to be picky about insisting that semicolons be quoted,
>> we should ensure that "native" namestrings returned by file-system
>> functions get any semicolons they might contain escaped.  The function
>> CCL::NATIVE-TO-PATHNAME will current quote asterisks (not a bad idea 
>> ...);
>> It seems to me that it should quote semicolons (and possibly colons) 
>> as
>> well (and likewise for CCL::NATIVE-TO-DIRECTORY-PATHNAME):
>>
>>
>> (defun native-to-pathname (name)
>>   (pathname (%path-std-quotes name nil "*;:")))
>>
>> (defun native-to-directory-pathname (name)
>>   (make-directory-pathname  :device nil :directory (%path-std-quotes 
>> name nil "*;:")))
>>
>> With those changes in effect, I did:
>>
>> [~] gb at zatoichi> mkdir dir
>> [~] gb at zatoichi> mkdir dir/semi\;path/
>> [~] gb at zatoichi> touch dir/semi\;path/file
>>
>> in a shell and did:
>>
>> ? (directory "home:dir;**;*.*")
>>
>> which returned
>>
>> (#P"/Users/gb/dir/semi\\;path/file")
>>
>> Is that similar to what you were trying to do, and does it fix the 
>> problem ?
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
-- 
Gary Warren King, Lab Manager
EKSL East, University of Massachusetts * 413 577 0176

To hold people without charge and without access to legal counsel risks 
the creation of an 'American gulag' for those detained in the course of 
the war on terror.
   -- Amnesty International USA




More information about the Openmcl-devel mailing list