Closed johnabs closed 2 years ago
I think that the way Snail's built-in evaluation works (using eval in module context) interferes with the internal plot
implementation in Gadfly (and Plots.jl). I found a comment in Gadfly.jl that says "rendering by plot
[may be] suppressed with either trailing semi-colon or by calling it within a function" — and Snail effectively causes plot()
to be called within a function when you use its Emacs commands.
Two workarounds:
You can use the new double-prefix argument form of julia-snail-send-line
or julia-snail-send-region
(like C-u C-u C-c C-l
). This will copy the relevant chunk of code to the REPL instead of using the Snail network connection. Because this runs code without module context, you may have to explicitly prefix the module name in front of your function calls.
Wrap the call in display()
, i.e. display(Gadfly.plot(sin, 0, 2pi))
. This is a better approach for most (but not all) workflows IMNSHO, so I'll document it in the README.
Please reopen if I can help further.
Is this standard behavior?
Basically, when I have Gadfly.plot(sin,0,2pi) in the julia repl within vterm, it will open a new buffer and display the input. However, I want this to also work for code I send to the repl via the snail shortcuts. It looks like it tries to display it with the popup display eval results; however, this only really works for text, from what I can tell.
Am I doing something wacky here or missing a step in my config?