tags:

views:

390

answers:

2

I'm using ccl/openmcl on Mac OS X. (latest versions of both). When the lisp prompt is displayed, using the cursor keys to navigate the current line results in escape codes, rather than movement, eg:

Welcome to Clozure Common Lisp Version 1.2-r9226-RC1 (DarwinX8664)!
? (^[[D

Here I've pressed the ( key, and then the left cursor key.

When I run ccl/openmcl on a Debian Etch box, the cursor behaves as expected, and moves the insert point one position left.

I guess this is some sort of terminal configuration option?

+4  A: 

If Clozure CL doesn't provide native readline/editline/whatever support or is configured not to use it, you can run it with rlwrap, for example:

rlwrap openmcl

rlwrap can be obtained via MacPorts or directly from http://utopia.knoware.nl/~hlub/rlwrap/.

Matthias Benkard
Is it likely that the build of ccl for debian would be configured to link to readline, whereas the one for Mac OS isn't?
John McAleely
Yes, I think there are licencing issues on Mac OS such that readline can't be included with the OS but must be installed by the user.
Nathan Sanders
I think apple doesn't like anything GPL'dhttp://www.mrchucho.net/2007/11/06/leopard-readline-and-vi-bindings/
Gene T
+2  A: 

i know that i'm not answering the question with this, but you should not spend much time directly using a lisp repl.

using emacs and slime is a much more convenient way of interacting with a lisp. you have an inspector and a debugger at hand, you can jump to the source code of the functions, etc.

Attila Lendvai