On Fri Jul 15, 2005 at 02:01:45PM -0700, GP lisper wrote:
On Fri, 15 Jul 2005 04:33:26 -0700, jeffrey@cunningham.net wrote:
"*STANDARD-OUTPUT* is bound to some Lisp stream maintained by SLIME, attached to an Emacs buffer. cdrecord was not designed to attach to an Emacs buffer, or to anything other than a terminal (or some program which emulates a terminal by understandin the control codes for moving your cursor around"
Is there a way to still embed this program call within my lisp project so I can still run it in slime without this behavior?
a) Check cdrecord options for a 'quiet' mode, where only the bare minimum is printed. Never used it myself, but ^H^H^H^H sounds like an updating bar graphic designed to display progress. You don't need it.
b) expand your external system call to include a pipe into a filter.
c) did someone suggest CL-PPCRE (same as 'b actually)?
I've done something similar with NGREP, but I also hacked it's source code to get what I wanted. CDRECORD might be clean enough for you to do that too.
I'll play with the verbosity - don't know why I didn't think of that. I thought of hacking the source, but don't really want to have to do it everytime I update cdrecord.
I've had trouble getting shell commands to run with ext:run-program under CMUCL, so that avenue might be difficult.
I guess I don't understand (c). I use cl-ppcre all the time but how would I capture *standard-output* from cdrecord and pipe it through regex match?
--Jeff