Remote REPLs with julia-repl in emacs

I’m having difficulty using julia-repl to run a remote REPL with tramp in emacs. I like julia-repl better than ESS because it uses the emacs term which allows use of the package manager, etc. in the REPL. However, it seems that julia-repl uses the emacs function make-term which uses start-process (instead of start-file-process) which, it seems, doesn’t allow one to change the default-directory variable. Has anyone managed to solve this?

I don’t see an easy way to change julia-repl to fix this. I think the emacs builtin file term.el would have to change.

1 Like

See this issue for julia-repl which suggests it’s not currently possible. If any comint-based solution works fine for you and you don’t mind some un-anchored elisp code floating around, you could use the inferior-julia improvements I hacked together (I plan to clean it up and package it eventually); it has support for package manager, help, and shell modes.

1 Like

This should actually be possible via ssh, I just need to think about how to implement this nicely.

1 Like

The solution, thanks to tkluck on another thread I posted about fixing the issue for ssh, is to use the “-t” option. This works well:

(make-term "test" "ssh" nil "-t" "user@hostname" "julia")

I’m going to wrap that in some simple clothes use it for now.

2 Likes

Yes, eventually I plan to make ssh work nice with julia-repl; it’s just that at the moment I am focusing on integrating libvterm. Making a terminal is actuallly trivial; ssh takes the place of the Julia executable and then the arguments are just appended to the command line.

It’s the user interface that is the tricky part and I want to think a bit about making that robust, so that one can reattach to an existing process (tmux, screen).

1 Like