# Emacs and julia

**URL:** <https://discourse.julialang.org/t/emacs-and-julia/4770>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 10, 2017, 7:23pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770 "2017-07-10T19:23:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![harven](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@harven](https://discourse.julialang.org/u/harven)\
**Post date:** [July 10, 2017, 7:23pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/1 "2017-07-10T19:23:57Z")

</div>

Hello emacs users,  
I see that there are at least 4 different ways to use julia from emacs.

[julia-mode](https://github.com/JuliaEditorSupport/julia-emacs) (official one?)  
[ESS](https://github.com/emacs-ess/ESS/wiki/Julia)  
[julia-repl](https://github.com/tpapp/julia-repl)  
[julia-shell-mode](https://github.com/dennisog/julia-shell-mode)

What are their respective strengths and features?  
Is there any reason to use one over another?

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 10, 2017, 7:55pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/2 "2017-07-10T19:55:18Z")

</div>

I use emacs but I hate the shell mode… I believe julia-mode should have the most up-to-date syntax though there are still known bugs in it.

I believe at least one (or both) of the repo/shell mode are built on top of julia-mode but I’m not entirely sure.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [July 11, 2017, 8:26am UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/3 "2017-07-11T08:26:00Z")

</div>

`ESS` wraps around `julia-mode` and is a good choice if you also do programming in `R`. `julia-repl` is a minor mode for `julia-mode` and provides integration into `term`, it supports the `Gallium` debugger and is an alternative to `ESS`.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 12, 2017, 8:46am UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/4 "2017-07-12T08:46:35Z")

</div>

Sidenote: I just got `julia-repl` into [MELPA](https://melpa.org/#/julia-repl). But until Gallium runs on `0.6`, the extra functionality over ESS is merely nice colors in the terminal.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 12, 2017, 9:32am UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/5 "2017-07-12T09:32:57Z")

</div>

Some folks have had success in using [LanguageServer.jl](https://github.com/JuliaEditorSupport/LanguageServer.jl) with emacs. There are still some hickups that we need to sort out, so probably best at this point to wait until these are resolved, but in principle it sounds as if we will be able to integrate nicely. See this issue for the current status:

[https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/110](https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/110)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 12, 2017, 11:30am UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/6 "2017-07-12T11:30:11Z")

</div>

This is very exciting. I expect I will contribute there, as `julia-mode` is just a workaround and the approach does not scale well.

---

<div class="post-metadata">

**Author:** ![ndbecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ndbecker/32/10829_2.png) [@ndbecker](https://discourse.julialang.org/u/ndbecker)\
**Post date:** [July 12, 2017, 12:04pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/7 "2017-07-12T12:04:59Z")

</div>

I’ve been using ESS, but I’m not totally satisfied. There is no completion with my setup. I’m using spacemacs, if that matters.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [July 12, 2017, 7:29pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/8 "2017-07-12T19:29:10Z")

</div>

you need to be careful with syntax highlighting in the repl, ESS had some serious performance issues when the repl accumulates too many lines of output.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [July 12, 2017, 7:33pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/9 "2017-07-12T19:33:54Z")

</div>

autocompletion with ess should work out of the box with spacemacs, do you have the `auto-completion` layer in `dotspacemacs-configuration-layers`?

---

<div class="post-metadata">

**Author:** ![ndbecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ndbecker/32/10829_2.png) [@ndbecker](https://discourse.julialang.org/u/ndbecker)\
**Post date:** [July 13, 2017, 11:31am UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/10 "2017-07-13T11:31:11Z")

</div>

yes, I do, and company mode is indicated in modeline

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [July 13, 2017, 3:19pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/11 "2017-07-13T15:19:48Z")

</div>

That is strange, sometimes it helps to delete temporary files from your `.emacs.d` folder (`recentf` and the content of the `.cache` folder) or to recompile all your packages, there is even a function for that (`spacemacs/recompile-elpa`).

---

<div class="post-metadata">

**Author:** ![harven](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@harven](https://discourse.julialang.org/u/harven)\
**Post date:** [July 18, 2017, 8:13pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/12 "2017-07-18T20:13:54Z")

</div>

I have downloaded julia-mode and ess from the melpa repository and eldoc and completion do not work.

TAB does not have any effect. If I type `map(` at the julia prompt, eloc prints `map:` in the minibuffer without displaying the arguments.

The help system works as expected though. The mode line displays `(iESS [julia]: run ElDoc)`. I am using emacs 25.1.1, this is a basic install with default configuration. I byte-recompiled ess without success. Any hint? Maybe I should install and build ess from git.

EDIT: an upgrade of ESS from MELPA to the latest version solved the problem.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [March 9, 2018, 7:19pm UTC](https://discourse.julialang.org/t/emacs-and-julia/4770/13 "2018-03-09T19:19:35Z")

</div>

checkout this: [Julia Spacemacs layer](https://discourse.julialang.org/t/julia-spacemacs-layer/9584)
