[slime-devel] Putting REPL prompt on the mode line?

Derek Peschel dpeschel at eskimo.com
Thu Dec 22 00:05:32 UTC 2005

As a first step toward my general goal of making a LISP interface that
is designed for random-access displays rather than simulated Teletypes,
I thought I would get the prompt out of REPL buffers and put the same
information on their mode lines.

A one-line change to sline.el prevents printing the prompt string,
but then I notice that "Evaluation aborted" messages appear in bold.
Probably the face used for input that has been completed is being used
for the messages.  Is there any complete spec for what can appear in REPL
buffers, so I know what code needs to be changed?

The one-line change is to slime-repl-insert-prompt (line 2642 in SLIME 1.2.1):
<           (prompt (format "%s> " (slime-lisp-package-prompt-string))))
>           (prompt ""))

The next problem is to put the information in the mode line or perhaps in
the top pane that currently shows the port and process IDs.  The standard
prompt shows the current package.  To the user, the prompt also means
"evaluation of the last form (or initialiation) was aborted or is complete"
as well as "the reader is expecting new input and is not in the middle of
reading anything".  Does SLIME have a notion of package change, evaluation
completion or abortion, and reader state change as separate events?  Does
the SWANK protocol allow them to be sent as signals that don't depend on
any particular text output also being sent to SLIME at the same time?

Thanks for your help,

-- Derek

More information about the slime-devel mailing list