[Openmcl-devel] readline editing

Pascal J.Bourguignon pjb at informatimago.com
Mon Jun 14 19:51:47 UTC 2004


Calvin writes:
> I'm a newbie to Lisp.  Most of my development experience is Python and on 
> IBM midrange machines.  I finished hackers and painters by Graham and 
> picked up his ANSI common lisp.  
> 
> I have a newbie question.  How can I get command line editing with 
> readline when using lisp interactively?  I've searched the web, the 
> archives, and the documentation, to no avail.  
> 
> using arrow keys to recall previous lines of code makes learning a 
> language much easier.  

readline is a library.  To have it activated, your program must link
with it. It's not technically difficult, but there are some legal
points to observe.  Namely, the readline library is GPL, not LGPL.
This means that a program that is distributed with it linked must be
provided with the sources and the copyleft.

Developpers who don't mind this then distribute their programs under
the GPL (for example, clisp).  Developpers who mind don't.

As a user (ie. non distributing entity) you are still free to modify
openmcl to have it use and link with readline. (But you cannot
distribute the binaries, because you cannot change the license on
openmcl).


Another solution is to use openmcl thru a user interface program using
readline.  I don't know if screen uses readline, it's been a long time
I've not used it.  But emacs does.  Running openmcl from a shell in
emacs, (or better, with ilisp or slime), gives you all the niceties
you want.


For more details, see:

    http://cvs.sourceforge.net/viewcvs.py/*checkout*/clisp/clisp/doc/Why-CLISP-is-under-GPL

and:

    man 3 readline

-- 
__Pascal_Bourguignon__                     http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/



More information about the Openmcl-devel mailing list