I’ve mentioned in a thread or two that I’ve been using the excellent jupyter emacs package with Julia for several months now, so I thought it might be a good idea to make a topic to highlight the package. For me, this package has worked very well and replaced julia-repl as my REPL for julia within emacs and replaced ob-ipython and ein for notebook-style work in emacs (I never actually got ob-julia working, and it isn’t currently maintained).
The cool thing about this package is that it’s designed as a general-purpose interface to jupyter from within emacs which the author has simply built a REPL and org-mode integration on top of. This means that unlike ob-ipython and ein, it doesn’t make a lot of python-specific assumptions about jupyter. Further, the integrations are customizable per-language, and the author is actually a julia user, so out of the box the REPL has niceties like latex substitution, rich text formatting of docstring markdown, and the prompt actually changing to e.g. help?> when in package, help, or shell modes.
Anyway, thought it might be worth posting on a Julia tool for emacs that the community might not be very aware of.
It’s especially important that it gets linked to because it never shows up on google at least for me unless I include the author’s name. Not sure why that is.
julia> using Pkg
julia> Pkg.add("IJulia")
julia> using IJulia
julia> notebook() # will install Jupyter the first time
# Shutdown the notebook from the browser before quitting
# the REPL
“Modules are not supported” at step 2: this is because your Emacs should support dynamic modules. It wasn’t the case for my out-of-the-box Emacs version on Debian and I had to manually rebuild and reinstall an Emacs version configured using --with-modules.
“No kernelspecs available” at step 2: if, like me, you let IJulia install jupyter automagically for you, chances are that the jupyter command is not in your PATH. You’ll have to add the correct jupyter installation directory to your PATH for Emacs to be able to find it.
first, determine the correct directory by running a notebook:
I having an error which is related to libzmq. Part of the output looks like this
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libzmq... yes
checking for library containing zmq_poller_new... no
configure: incompatible libzmq, building one locally
./configure: line 4054: syntax error near unexpected token `win32-dll'
./configure: line 4054: `LT_INIT(win32-dll shared disable-static)'
make[1]: *** [Makefile:43: configure] Error 2