So it turns out that using #\\ (backslash) as the macro reader for the "this is a shell command" syntax is a bad idea. It makes it difficult to enter strings with embedded quotes later on.
"This \"is a\" test" turns into something totally wonky, i.e. something more like
"This " (run "is a\" test"). Anyway, it's weird. Not sure what a better choice would be just yet. I've had a couple thoughts:
- Modify the Listener reader so that all input lines are assumed to be shell input unless they start with #\( or #\:
- give up on the idea of entering shell commands in a Lisp Listener as easily as I do at a shell prompt
- do like the clisp shell page does and a) use #[...] and b) program a keyboard macro to generate the "#[ ]" sequence.
- Abandon the Listener reader and write a custom reader. Of course I'm not sure how to do this in Lispworks. :)
For now I'll probably go with the clisp shell approach.
tags: lisp
links: digg this del.icio.us technorati reddit