[Top][All Lists]

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

Re: I/O in geiser-eval-buffer

From: Jose A. Ortega Ruiz
Subject: Re: I/O in geiser-eval-buffer
Date: Sat, 18 Jan 2020 04:00:52 +0000

On Sat, Jan 18 2020, Vladimir Nikishkin wrote:

> Hello, everyone
> I have the following tiny example:
> (display "hello")
> (read)
> I also have guile running in run-geiser
> M-x geiser-eval-buffer RET doesn't work. Or, rather, it works in a weird way.
> After I type the command, Emacs locks.
> I can then C-g and switch to the REPL buffer, and type
> (hi)^J
> The parentheses are shown, but "hi" isn't.
> Then I C-g again, and the repl shows:
> ((result "(hello)") (output . "hello"))
> typeset in red.
> So I am not really able to debug anything interactive with geiser.

Nope, that's a limitation of geiser.

> Can evaluation be made asynchronous?

It is already asynchronous, but it doesn't know how to read
interactively (it cannot prompt you easily, in part precisely because
it's async).  

The place to try interactive things is the REPL; there typing (read)
will work.  When I want to try interactive things, it's never evaluating
(read) or similar directly in a *module*.  Rather, i've got modules with
functions that are interactive

       ;; scheme buffers in geiser are always considered modules
       (define-module ...)
       ;; lots of code here, then...
       (define (ask-user) .... (read))

and then i go to the REPL and there i evaluate (ask-user) to try.  It is
unusual to have a module that calls anything interactive when loaded,
and what geiser-eval-buffer does is loading a module.

One can also run a guile independently, and connect to it from emacs
with geiser-connect (check the manual for details), and then run
interactive things in the independent guile.  That again is not what
you're asking for, but it's all that we have :)

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]