geiser-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme: quicker process handling (RESTART 1) etc


From: Jose A. Ortega Ruiz
Subject: Re: Scheme: quicker process handling (RESTART 1) etc
Date: Tue, 10 Mar 2020 21:18:21 +0000

hi nicholas,

On Tue, Mar 10 2020, Nicholas Papadonis wrote:

> I'm using Geiser to interface with MIT Scheme in Emacs via M-x
> run-mit.  I found that once an error is encountered in the REPL, the
> command history no longer works.  The error must be cleared out via
> (RESTART 1) first for command history to work.
>
> Do folks have a quick process recover from errors?  For instance do
> you just create an Emacs keybinding to input (RESTART 1) into the
> REPL?

i don't use mit that much, so maybe someone else will give you a better
idea, but defining such a command would be easy:

  (defun geiser-mit-restart ()
    (interactive)
    (geiser-repl--send "(RESTART 1)"))

and it shouldn't be complicated to extend that to take, say, a prefix
argument to specify the restart level, or to prompt for it, eg.:

  (defun geiser-mit-restart (&optional prompt)
    (interactive "P")
    (geiser-repl--send (format "(RESTART %s)" 
                               (if prompt (read-number "Level: ") 1))))


hth,
jao
-- 
We are usually convinced more easily by reasons we have found
ourselves than by those which have occurred to others.
  -Blaise Pascal, philosopher and mathematician (1623-1662)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]