Subject: [clisp-list] Running a batch program the permits use of the debugger

From: "Steven E. Harris" <[email-masked]>
Date: Sat May 15 17:03:45 2004

CLISP offers many ways to start up a CL program, but I can't find one
that allows me to enter the interactive debugger when an error
arises. All of the techniques I've tried so far -- the "#!" shell
script (with and without -interactive-debug), the saved image with an
:init-function, and passing a form on the command-line all disable
interactive debugging (including restart selection).

I have some programs written that I /expect/ will not work properly
right away, but I'd like to start using them outside of XEmacs/SLIME
(where the debugging interface is just fine). And even if my programs
did work properly, they may still wish to use interactive
restarts. I'd like to be able to kick off one of my CL programs like:

,----
| $ myprog arg1 arg2
| running...
| running...
| *** - ERROR: Something went wrong.
| The following restarts are available:
| TRY-AGAIN    :R1     Try this operation again.
| 
| Break 1 [4]>
`----

Is there some way to prepare a program with CLISP that will permit
this kind of interaction?

-- 
Steven E. Harris

---

From: Sam Steingold <[email-masked]>
Date: Sat May 15 19:29:00 2004

> * Steven E. Harris <[email-masked]> [2004-05-15 17:01:43 -0700]:
>
> arises.

normally, scripts are run under SYSTEM::BATCHMODE-ERRORS
(executes the forms, but handles errors just as a batch program should
do: continuable errors are signaled as warnings, non-continuable errors
and Ctrl-C interrupts cause Lisp to exit)
with -interactive-debug, continuable errors are turned into warnings
and CONTINUE restart is invoked automatically.
with -repl, you get full interactivity on any error.

http://clisp.cons.org/clisp.html#opt-interactive-debug
http://clisp.cons.org/clisp.html#opt-repl

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Daddy, why doesn't this magnet pick up this floppy disk?