tpapp / julia-repl

Run an inferior Julia REPL in a terminal inside Emacs
Other
169 stars 35 forks source link

using Plots package, plot windows not shown #125

Closed bernaloo closed 1 year ago

bernaloo commented 1 year ago

Im using the package Plots

https://github.com/JuliaPlots/PlotDocs.jl.git

and I would like to see the plot windows when using the Julia-repl mode.

Is there a way to let them show up?

wentasah commented 1 year ago

Plots show normally for me when using julia-repl. Can you describe your environment a bit (OS, Julia and Emacs versions, etc.)? Do the plots show when you run the same thing on Julia REPL (without Emacs)?

bernaloo commented 1 year ago

I have actually two configurations not showing the plots. One with windows 10 and WSL2 and the other:

Im not sure where to start to debug this.

wentasah commented 1 year ago

I use neither WSL nor MacOS, so I'm afraid I cannot help much here. I'd start by comparing the environment variables (ENV) when running Julia in Emacs and outside of it.

hexaeder commented 1 year ago

For debugging, you could also try what happens if you run the julia repl manually inside a term/vterm within emacs.

bernaloo commented 1 year ago

For debugging, you could also try what happens if you run the julia repl manually inside a term/vterm within emacs.

@hexaeder thanks! that was an interesting test.

in WSL, the plot will be shown. in macOS an error will be thrown:

from here I can continue debugging. I will report results

bernaloo commented 1 year ago

@hexaeder @wentasah following your tips I did manage to bring Julia-repl to plot under emacs. The solution was to set the flags as they were in my native julia-repl environment. I also had to update the page "GK" now I just need to change the behaviour of the hot-key C-C C-B (run the buffer in Julia) no to use ";" at the end. This will mute plots.

wentasah commented 1 year ago

You can use C-u C-c C-b, which will not include the file, but send it verbatim to the REPL without appending ;.