Emacs with Julia

902 views
Skip to first unread message

Ben Ward

unread,
Jun 16, 2013, 2:54:56 PM6/16/13
to julia...@googlegroups.com
Hi, 

Just used the readme to get julia working with emacs and ESS - but I'm wondering what I need to do with the julia mode script that's in the contrib folder of the julia directory - if anything, How have other people set this up? In addition, what do people recommend in terms of editors for julia? The only two I've seen mentioned are Emacs and JuliaStudio

Best,
Ben. 

bobnn...@gmail.com

unread,
Jun 17, 2013, 12:17:48 AM6/17/13
to julia...@googlegroups.com
I think if you use ESS mode you do not want to use the julia-mode.el code in contrib. ESS mode has more features than julia-mode.el so it is a good way to go. I use emacs for all my coding and it works well.

Bob

Tim Holy

unread,
Jun 17, 2013, 6:21:16 AM6/17/13
to julia...@googlegroups.com
On Sunday, June 16, 2013 11:54:56 AM Ben Ward wrote:
> In addition, what do people recommend in terms of editors for
> julia? The only two I've seen mentioned are Emacs and JuliaStudio

Inside the contrib/ directory you'll find modes for multiple editors.

Best,
--Tim

Stephen Eglen

unread,
Jun 17, 2013, 7:03:42 AM6/17/13
to julia...@googlegroups.com
ESS has a version of julia-mode.el that is dervied from the version in
contrib -- so ignore the contrib/ version. Stephen

Raphael Sofaer

unread,
Jun 18, 2013, 9:06:51 AM6/18/13
to julia...@googlegroups.com
I'm using sublime text, which has a pretty good julia mode that I got through the package manager.

Jacob Quinn

unread,
Jun 18, 2013, 11:28:50 AM6/18/13
to julia...@googlegroups.com
I'll chime in as well with a pitch for Sublime Text. I created a port of SublimeREPL which allows a Julia repl to run within sublime text 2. The package and install instructions are here: https://github.com/karbarcca/Sublime-Julia

-Jacob

Stefan Karpinski

unread,
Jun 18, 2013, 11:37:15 AM6/18/13
to Julia Users
I've got to try this out. Also, I just added Sublime Text to the list of supported editors.

Ben Ward

unread,
Jun 18, 2013, 5:39:34 PM6/18/13
to julia...@googlegroups.com
I'm giving sublime text a go - looks good! The juliaREPL doesn't want to work though, even with my path set up for it according to the instructions (OSX):

"default_extend_env":{"PATH":"/Users/wardb/julia/usr/bin;{PATH}"},

I get a message saying `OSError(2, 'No such file or directory')` when I try to start julia under tools > SublimeREPL - Julia > Julia.

Best,
Ben.

Jacob Quinn

unread,
Jun 18, 2013, 5:50:09 PM6/18/13
to julia...@googlegroups.com
There might be a few things going on here.

* The name of the file it's looking for is "julia-release-basic"; can you make sure that exists in your julia/usr/bin folder?

* You may try fiddling with the extend_env key-value: "default_extend_env":{"PATH":"{PATH}:/Users/wardb/julia/usr/bin"}

* Are you saving in the default package settings? Make sure to copy default package settings and paste into Preferences => Package Settings => SublimeREPL-Julia => Settings - User

* I've heard of some OSX file system case sensitivity issues lately, this is a maybe...

Hopefully some of these ideas help.

-Jacob

Ben Ward

unread,
Jun 18, 2013, 6:18:30 PM6/18/13
to julia...@googlegroups.com
Hi,

It does not the like it if I put the line in as you say:

Error trying to parse settings: Unexpected trailing characters in ~/Library/Application Support/Sublime Text 2/Packages/User/SublimeREPLjulia.sublime-settings:6:22

But julia-release-basic does exist in the directory,

Best,
Ben.

On Sunday, June 16, 2013 7:54:56 PM UTC+1, Ben Ward wrote:

Ben Ward

unread,
Jun 18, 2013, 6:23:49 PM6/18/13
to julia...@googlegroups.com
Ahah - I've got it going!

Thanks,

Ben.

On Sunday, June 16, 2013 7:54:56 PM UTC+1, Ben Ward wrote:

Jacob Quinn

unread,
Jun 18, 2013, 7:49:24 PM6/18/13
to julia...@googlegroups.com
Mind sharing what made it work for the greater community?

-Jacob

James Porter

unread,
Jun 19, 2013, 12:20:08 AM6/19/13
to julia...@googlegroups.com
Relatedly, I just added a quick-and-dirty inferior Julia shell to julia-mode.el, since its something I use all the time with other dynamic languages. I know its also part of ESS but that is a huge package that does a million things I have no interest in and I like to keep my config as modular as possible. If anyone else wants this the relevant file is in my fork of Julia (https://github.com/porterjamesj/julia/blob/inferior-julia/contrib/julia-mode.el). I bind C-RET to send-line-or-region and C-shift-R to reload-buffer. Note that you have to set the path to your Julia executable, and it must be the non-readline version, as the readline one doesn't play well with comint-mode.

Best,
James


On Sunday, June 16, 2013 2:54:56 PM UTC-4, Ben Ward wrote:

Ben Ward

unread,
Jun 19, 2013, 6:17:40 AM6/19/13
to julia...@googlegroups.com
I messed about with the command a bit more and found that replacing the semi-colon I had in my path string with a colon made it work. Are there key bindings for the Julia specific repl like for SublimeREPL - I note it also does not seem to appear in the Command Pallette - or it does have an option REPL - Julia, but if you select it and press enter it does not start (I checked and others like REPL - Python and REPL - R do - and the Julia REPl does if I go to it through the menu's - just not the pallete).

Best,

Ben.
Reply all
Reply to author
Forward
0 new messages