reconnecting and *GLOBALLY-REDIRECT-IO*
Gábor Melis
mega at retes.hu
Mon Nov 23 23:32:34 UTC 2015
Luís Oliveira <luismbo at gmail.com> writes:
> On Mon, Nov 23, 2015 at 4:18 PM, Gábor Melis <mega at retes.hu> wrote:
>> Then switch to *slime-scratch* and evaluate with C-x C-e the loop
>> form. The output goes to the repl regardless of
>> *globally-redirect-io*. Now disconnect, reconnect and there is no more
>> output although the thread is still there.
>
> Right, so what happens in that scenario is that a thread is spawned
> via SWANK::SPAWN-WORKER-THREAD to handle the C-x C-e request and
> eventually calls SWANK::WITH-IO-REDIRECTION which will bind the
> various stream variables to the specific REPL stream created for the
> current connection.
>
> I've attached a tentative fix for your use case.
Thank you, I'll test it tomorrow.
> I'll have to think a little bit about the broader implications. Can
> you tell me a bit more about how your use case came about? That might
> help.
I had a couple of uncommented forms at the bottom a file to evaluate
which I did. Since it takes several days for the computation to finish,
my laptop on which Slime ran went to sleep and I had to slime-connect
again on resume.
In general, I almost never use the REPL and tend to evaluate stuff from
buffers. I didn't even realize that forms evaluated at the REPL don't
have this problem until testing it yesterday.
More information about the slime-devel
mailing list