since the slime repl is built into emacs i'm wondering if we need to stick to the "type a magic command into the repl buffer" idea current embodied by the various repls.
here's a completely different way of doing it:
When you are at the start of the repl there is a special character (by default #,) which begins a repl command. if you type this charcter we ask you (via a completing read in the mini-buffer) what command you want to run, based on what you type we pass control off to a regular interactive emacs function which gets its parameters via the minibuffer (or whatever) and executes whatever code it wants.
Pros:
1) we can use read-directory-name to read the arg for cd, we can using a completing read for the pack command, etc. basically we can use whatever emacs input conveniences we see fit instead of having to parse everything from the command line, and emacs is good at this stuff.
2) the repl commands are available as regular emacs functions and can be put into menus.
3) it's a hell of a lot simpler to implement.
4) we can give commands long names, completion will take care of the rest.
Cons:
1) its really different from the "obvious" definition of a repl command.
2) it doesn't show up in the repl history or buffer anymore (though this could be changed into something similar to CLIM's Listener).
3) Aborting a command mid way requires a C-g and blinks emacs, instead of just being a C-a C-k.
Given how trivial this is to implement i could just do it and we could try it out and see if it works or not.
comments?
-- Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen