[cmucl-help] CTRL+C

Patrick M. Rutkowski rutski89 at gmail.com
Wed Oct 28 14:23:32 CET 2009


On Wed, Oct 28, 2009 at 7:44 AM, Alex Goncharov
<alex-goncharov at comcast.net> wrote:
> ,--- You/Patrick (Wed, 28 Oct 2009 05:30:37 -0400) ----*
> |
> | Take the following program:
> | cmucl -eval '(defun foo () (progn (format t "Hello World~%") (foo))) (foo)'
> |
> | What would be the most straight forward way to get CTRL+C to quit back
> | to the shell, as opposed to dumping me into a debugger?
>
> Why would you want it?
>
> The non-easiness of leaving Lisp is intentional -- there is often too
> much state to lose, and Ctrl-C or -D may be typed by accident.
>
> Use '(quit)', on a CMUCL prompt or in your program.
>
> E.g.
>
>  lisp -eval '(progn (format t "Hello World~%") (quit))'
>
> -- Alex -- alex-goncharov at comcast.net --
>

Because 99.9% of the time when I hit CTRL+C during development it's
because I've seen my program doing something wrong, and already know
how to fix it. Having to type CTRL-C-LPAREN-Q-U-I-T-RPAREN-ENTER every
time is really annoying.

Because in UNIX terminal culture CTRL+C means "quit the program, right
now". CMUCL shouldn't take license to make exceptions to what shell
users expect.

I've never experienced a single development environment in wich I
couldn't quit out of my program-to-be with a keyboard shortcut, so the
way CMUCL works here makes me very uncomfortable.

Both CLISP and SBCL have options like "--no-debug" that make CTRL+C
behave as is intended for sane shell use.

I thought that all would have been obvious, unless you're not familiar
with with UNIX.

-Patrick



More information about the cmucl-help mailing list