1

In ABCL, during development I sometimes get runaway functions. I want to be able to stop execution and return to top level LISP without killing the LISP/JVM process (in my emacs shell) and losing my current LISP environment.

I've tried various control keys (e.g., Control-C, Control-D,...) but at best end up killing LISP or the JVM.

;;; How to stop this function and return to LISP interactive ;;; without killing lisp...? (defun runaway () (let ((result nil)) (dotimes (count 10 result) (sleep 2) (print count))))

C-c C-cTerminate batch job (Y/N)? n n

Process inferior-lisp exited abnormally with code 130

coredump
  • 37,664
  • 5
  • 43
  • 77
  • NB: I just saw your question because I rarely look at the abcl tag; you would have better exposure if you add the "common-lisp" tag too (or lisp) – coredump Jun 06 '19 at 15:57

1 Answers1

0

Try using Emacs with Slime instead, because Slime does not kill the process but interrupt the thread and enters the debugger if you press C-c C-c.

You should probably add an executable script abcl.sh somewhere in your PATH, as follows:

#!/bin/sh
exec java -jar .../abcl/abcl-bin-1.5.0/abcl.jar

You have to replace ... with your own path to abcl.jar.

Then, from Emacs, you should be able to start it.

Do C-u M-x slime to force the slime command to prompt for an executable, and give abcl.sh to it. It should start the process and connect to it using the Slime protocol.

coredump
  • 37,664
  • 5
  • 43
  • 77