Linedit is a portable line-editing console library for Common Lisp.

Successor to cl-readline.

More information on Linedit homepage.

New in release 0.16:

  • Should work on Lispworks and OpenMCL/CCL.

Bug-reports appreciated. Patches appreciated even more.

Well, submitting bugs and patches is not allowed at all without having a pre-existing gitlab account, there's no apparant way to get a gitlab account, and the mailing list link leads to a 404 page not found, so perhaps bug-reports and patches aren't all that appreciated after all. But maybe you meant submitting bug reports on the page here? I can do that!

This is for SBCL 1.2.10 on Arch Linux, readline library version 6.3

  • pressing "Up-arrow" introduces garbage binary data to the input, if you are at the beginning of input history. Checking whether you are at the beginning of a list is pretty basic stuff... so this package should probably do that.
  • I don't know why I was having trouble with end-of-file conditions. It started working for some reason, ctrl-d and it prompts and lets me exit.
Might offer some patches later, but of course I can't send them to without a gitlab account.

-- cy

Installing Linedit as REPL for SBCL without disturbing ILISP or SLIME requires some tweaking:

In your .sbclrc:

;;; Check for --no-linedit command-line option. (if (member "--no-linedit" sb-ext:*posix-argv* :test 'equal) (setf sb-ext:*posix-argv* (remove "--no-linedit" sb-ext:*posix-argv* :test 'equal)) (when (interactive-stream-p *terminal-io*) (require :sb-aclrepl) (require :linedit) (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t)))

And then in your .emacs:

(setq inferior-lisp-program "sbcl --noinform --no-linedit")

You might also want to add :eof-quits t to the install-repl form.

Another way is instead to say in your .sbclrc

(when (and (interactive-stream-p *terminal-io*) (null (find-package 'swank))) (require :linedit) (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t))

which doesn't require having a separate file for your ordinary initialization code. -- James A. Crippen

How do you make this second method work? I can't and don't see how since SBCL by necessity processes its initfiles before it gets around loading swank. -- Nikodemus Siivola