[slime-devel] Re: lisp restart
Pascal J.Bourguignon
pjb at informatimago.com
Thu Jul 1 23:30:51 UTC 2004
Marco Baringer writes:
> Andras Simon <andras at renyi.hu> writes:
>
> > I've been meaning to ask about this for some time: why is
> > ,sayoonara so eager to remove all traces of lisp activity?
>
> because it's supposed to be a "i'm done with my lisp work so go away"
> command. if all you want to do is kill the underlying lisp you have
> (swank-backend:quit-lisp).
>
> if you want to just restart the lisp without mesing with the repl
> buffers:
>
> (defun slime-restart-lisp-image ()
> (interactive)
> (when (slime-connected-p)
> (dolist (buf (buffer-list))
> (when (or (string= (buffer-name buf) slime-event-buffer-name)
> (string-match "^\\*inferior-lisp*" (buffer-name buf)))
> (kill-buffer buf))))
> (call-interactively 'slime))
>
> how often do people actually do this?
Often enough. When debugging some programs or compilation or
isntallation procedure, you need to restart with a clean state, but
it's handy to keep the history in the buffer.
And conversely, I have some images running for a long time, where it's
usefull to clean the buffer from time to time to have a clearer view
of it. For example, when I dump a big backtrace, I like to clean
everything from the top of the buffer down to the start of the
backtrace to avoid puzzling over a previous backtrace. (Perhaps I
should use narrow-to-region/widden, but I like to give work to the
garbage collectors).
--
__Pascal Bourguignon__ http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
More information about the slime-devel
mailing list