geiser-users
[Top][All Lists]
Advanced

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

Re: [Geiser-users] Using multiple REPLs from elisp


From: Jose A. Ortega Ruiz
Subject: Re: [Geiser-users] Using multiple REPLs from elisp
Date: Thu, 13 Dec 2012 05:01:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On Thu, Dec 13 2012, Michael Gauland wrote:

> Jose A. Ortega Ruiz <address@hidden> writes:
>
>
>> Geiser associates buffers to REPLs by setting a local variable in the
>> scheme buffer, geiser-repl--repl, so in principle it shouldn't be
>> necessary to maintain a separate table is that variable is set for the
>> buffer at hand.  When you do a switch-to-geiser from a scheme buffer,
>> that variable is set automatically, possibly after creating the REPL.
>> 
>> Afterwards, all evaluation commands defined in geiser-mode.el use that
>> variable to choose to which REPL the code is sent.  So, in principle, if
>> you call commands defined in geiser-mode.el (in the section ;;Evaluation
>> Commands) things should work out of the box without any additional
>> book-keeping on your side.
>
> Thanks--that gives me a good place to start.
>
> This process may be complicated by the way babel works. Each block is
> evaluated from its own temporary buffer, so the source buffer for
> which a REPL was initially created may no longer exist when I go to
> use it again.

It that case you need to remember the REPL buffer (perhaps as a buffer
local variable in the original org file, or maybe using your original
hash table idea), and then just set the buffer-local variable
geise-repl--repl to the REPL buffer in the the temporary buffer you want
to evaluate just before invoking the geiser-mode command

Cheers,
jao
-- 
If God exists, I hope he has a good excuse.
  -Woody Allen, author, actor, and filmmaker (b. 1935)



reply via email to

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