Julia-repl (Emacs) new release candidate - testers needed

julia-repl is an Emacs mode that provides a Julia REPL inside Emacs using ansi-term, allowing an integrated workflow with julia-emacs that supports debugging, colors, and everything that requires a terminal.

I have been working on a new release, with the following additional features:

  1. “clickable” error message locations,
  2. C-c C-b (send the whole buffer to the REPL) uses include by default (less clutter),
  3. all send commands (except C-c RET) now use bracketed paste mode.

Since I program in Emacs out of necessity, I would appreciate some testing from community members willing to help out before I tag this as a release. Just pull the latest master from the repo above, and provide feedback in this topic or open an issue.

(special thanks to @mauro3, who has helped a lot with testing and suggestions).

16 Likes

I would like to thank everyone who provided feedback. No new bug reports, so I tagged the current master as v0.1.0. If you are using MELPA, it should be updated automatically next time you upgrade your Emacs packages.

There is again a new release candidate in the master branch of

Compared to the last release, it contains fixes for Julia 1.0 & packages (eg output from Revise.jl), and
the ability to run multiple Julia versions and multiple processes for the same version.

Testing is welcome, please provide feedback here or in an issue. If all goes well, I will tag a release in a week.

4 Likes

In your readme you use (expanduser "~/src/julia-git/julia"), however in my emacs there is no expanduser. However, for me it works just using "~/...".

Somewhat off topic:
I found that if the julia session prints tons and tons of stuff (and may not responsive to C-c), then emacs becomes unusable. For instance running:

julia> while true
       print("hi ")
       end
hi hi hi ...

it can get pretty difficult to regain control, as issuing a C-c is not easy due to the sluggish emacs. Is there a way to make this better? (When running this in a terminal REPL, I can hit C-c no probs.)

Sometimes C-g works, but I don’t have a good fix for this.

Thanks for the report about expanduser, which is actually in Julia and I don’t know how it got to elisp code, but I removed it.

expand-file-name would be the Elisp equivalent of expanduser

1 Like

Thanks, but it looks like it is not needed as ansi-term can handle the ~ (at least in Linux). If I get a bug report about it, I will modify the README.

Also, added functionality in the tp/activate branch that looks for a Project.toml and activates it when found. The shortcut is C-c C-a. Will be merged pending a clarification from Pkg.jl.

I merged the project activation functionality, so C-c C-a (in the Julia source file buffer) should now look for a [Julia]Project.toml in the containing directories, and if found, pkg"activate ..." it.

Also did some linting, but that should not affect anything. This is the last change I am planning before tagging a release, please test if you can (as always, you can just install from MELPA). If there are no problems, I will tag a release on Saturday.

Tagged a stable release :tada::

https://github.com/tpapp/julia-repl/releases/tag/1.0.0

Should be available via MELPA Stable shortly. As usual, bug reports and feature requests are welcome; and keeping on using master is appreciated as it helps with testing.

Future announcements will be in this topic.

5 Likes

New feature: in addition to the existing C-c C-a which looks for a Project.toml and activates the corresponding project, C-u C-c C-a reverts to the “home” (default) project. Already in released stable version.

Is this working on Windows? I am getting an error:

Warning (emacs): could not capture basedir for Julia executable julia

Unfortunately I just found an issue (https://github.com/tpapp/julia-repl/issues/20) which matches my own error messages. It appears something is broken in Emacs on Windows…

I am happy to reopen the issue, but I don’t use Windows so I need help from someone who is willing to get to the bottom of this and make a PR.

I have tried many things. Apparently the Windows Emacs does not handle bash well. I keep getting the error

Spawning child process: invalid argument

Even starting a shell in Emacs and then trying to run Julia doesn’t work: the process cannot be communicated with.

I posted having this same “issue” with Xterm, there is a means for modifying color via the docs @ The Julia REPL · The Julia Language

The other “fix” is using julia --color=no though I’m actually not sure how to pass in args using M-x commands but I’m assuming this is possible in a emacs dot file.