[slime-devel] Handling ^M and ^H characters output from ext:run-program?
jeffrey at cunningham.net
Fri Jul 15 11:33:26 UTC 2005
I posted the following question on comp.lang.lisp:
I have this code embedded in a process I'm running:
(ext:run-program "cdrecord" args
and it works fine, except that the cdrecord utility (and many others) uses
both backspace ^H and carriage return ^M to write updates to the screen.
This makes a big mess in the slime-repl window ,as they aren't properly
interpreted and so stuff spews out for miles before it finishes.
Is there a way to capture these characters before they hit
*standard-output* and interpete them so they either work correctly or are
at least benign (i.e. convert carriage return to a linefeed, and any
sequence of backspaces ^H^H^H^H^H^H^H with a linefeed)?
One of the respondents pointed out that:
"*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?
More information about the slime-devel