[racket-dev] Line editing in the default REPL

From: Leif Andersen (leif at leifandersen.net)
Date: Mon Nov 24 17:57:02 EST 2014


When a user first starts the racket repl, it doesn't do line editing due to
licensing issues. For example, it would be nice if the default editor would
give the previous line if you hit up arrow, rather than writing "^[[A".

I have now pointed out xrepl to several users, and every time they always
ask me why it's not the default repl. Apparently the problem is that xrepl
uses GNU Readline, which is GPL. However, Asumu found that if we replace
requiring readline with BSD's libedit (not libeditline), everything works
fine due to libedit's readline compatibility. It doesn't have all of the
features of readline, but it does have some of the biggest ones (such as
being able to use arrow keys)

What do you all think of having `(require editline)` that works for the
default repl, so that it gets line editing features. This would allow us to
also keep `(require readline)` as before, maintaining backwards

If we do do this, this leads to the question of distribution. Would we want
to include libedit inside Racket distributions, or should we just link to
whatever the user has on their system?

~Leif Andersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20141124/605579c8/attachment.html>

Posted on the dev mailing list.