[Openmcl-devel] Hi from new user
gb at clozure.com
Tue Feb 24 10:06:15 UTC 2009
On Mon, 23 Feb 2009, Denis Bodyak wrote:
> Hi Gary, Ray, list!
>> If that's the bug, then just doing:
>> ? (run-program "svn" '("info") :output t)
> It looks like that... It looks like I didn't restart my cmd.exe after installing adding svn to a path.
>> Yes. The printed representation of a pathname (and the result
>> of the function NAMESTRING) will escape/quote dots that are
>> constituents of the pathname's name or type components (as opposed
>> to a dot that separates these components.) When a string is coerced
>> to a pathname, escaped dots are interpreted as constituents.
> Ok, but I see no way to address md5.asd.lnk at all . ' is not a quoting character under win32 so this is evidently a bug.
I don't understand either of those sentences.
>> I believe that it reads as #\a,#\Return,#\Newline,#\b, which would
>> be exactly what the console sent (where #\Newline is also known as
> Yes, I was wrong, sorry. I thought it returns #\Return instead of #\Newline, and didn't even check that third element exist. It returns #\a,#\Return,#\Newline,#\b.
> (with-input-from-string (s "a
> b") (read-line s))
> returns a string of #\a,#\Return. This causes odd printing:
> - no closing double-quote is printed at all. This would be ok too. But I use GNU's readlink.exe to resolve *.asd.lnk to *.asd (as asdf does on linux).
> Here readlink returns (I guess)
> (here I guess we have #\Return and #\Newline).
> Then I use readline (as you do in case of svn-info-component) and I get a filename with #\Return in the end of it. I have to remove it manually to get correct filename.
We are in agreement that the #\Return in the CRLF causes problems and should
be stripped out (long before READ-LINE or READ-CHAR would see it.)
>> I'm trying to force myself to actually use Windows without using
> Are things easier in ccl with cygwin? If so, I can just install it.
> Especially if this could help solve md5.asd.lnk issue.
What is the md5.asd.lnk issue ?
One consequence of the escaping is that you can't just pass a
lisp namestring to foreign code:
(with-cstrs ((cname (namestring (truename path)))) ; wrong: result may contain escaped characters
(with-cstrs ((cname (ccl::native-translated-namestring path)))
That's pretty ugly; something imported and documented like:
(with-native-foreign-namestring ((cname path))
;; todo: pathname encoding, etc.
is a bit less so.
Cygwin introduces its own set of problems (for example, if a non-Cygwin
process is running under a Cygwin shell, a ^C terminates that process.)
Most (all?) Cygwin utilities just use LF (not CRLF), so all of the
issues related to line termination can be ignored. (perhaps for a
little too long.)
> Thanks for detailed reply :)
More information about the Openmcl-devel