Conversation
a09e8d8 to
da04a97
Compare
|
Thank you for all this work. I think your approach of keeping track of the running REPLs and their ports is reasonable, but probably needs to be refined by hooking into the events that occur when a REPL buffer is killed or renamed. I’m concerned that the way you check for open ports by calling Broadly speaking, you implemented an automatic port choosing mechanism, whereas I tried to avoid doing all that work and forced port selection to be manually done by the user. :) This is a good feature, but I won’t have time for a while to properly review or work on it. Let’s keep this open, and I’ll get to it when I can. |
|
I agree, the port-checking function is quite far from being portable. There is no guarantee that |
da04a97 to
37ef0fb
Compare
|
Another approach to finding a free port is to use The downside is of course that the chosen port is much less predictable than your approach |
Added functions - julia-snail--port-in-use-p - julia-snail--find-free-port - julia-snail-multiple-repls
c13e3c5 to
3de465b
Compare
Hey,
Coming from R and ESS, I use multiple REPLs quite frequently. So I set
out to do it in Julia as well. This is my first Emacs Lisp PR: So
while the code works (I have been using it for the past week), the
code could definitely need more elegance.
Added functions
When calling
julia-snailin a Julia buffer, it now does the following:When a buffer has already been associated with a REPL and you want to connect it to
a new or other one, call
julia-snail-switch-or-create-repl.What does not work:
manually update the
julia-snail-repl-buffervariable tooAt the moment, I simply record any new REPL buffers (and their ports)
in a list when they are created. Obviously, this is error-prone, as
this approach fails when a REPL buffer is exited or renamed. So what
would still be nice to have is a way to get the list of active REPL
(and their ports) at a given time. Do you happen to know this could be
done?