emacs ess julia trouble

509 views
Skip to first unread message

Neal Becker

unread,
Jul 31, 2014, 7:27:19 AM7/31/14
to julia...@googlegroups.com
I am trying emacs ess mode for julia. I added to .emacs:

(require 'ess-site)
(require 'julia-mode)
(setq inferior-julia-program-name "/home/nbecker/.local/bin/julia")

I can invoke a julia shell, using M-x julia.

But if I visit a julia source file, there are no ess functions. There is no ess
menu there (there is in the julia shell buffer).

What's really confusing is, the first time I had tried this it worked. The
julia buffer had ess menus, and bindings such as C-c C-c worked. Now I can't
seem to replicate what I did.

Any ideas?

Neal Becker

unread,
Jul 31, 2014, 9:51:02 AM7/31/14
to julia...@googlegroups.com
Ah, it seems

(require 'julia-mode)

will interfere with ess-julia.

It seems ess-julia.el also defines julia-mode.

I guess ideally only 1 julia-mode should be defined.

Sarvagnan Subramanian

unread,
Aug 1, 2014, 2:32:01 PM8/1/14
to julia...@googlegroups.com, ndbe...@gmail.com
I'd like to pose a question on the ess config itself. I haven't been able to find a satisfactory explanation anywhere. What directory do you need to provide in the seta inferior-julia-program-name field? When starting julia with M-x julia, this question comes up "ESS (*julia*) starting data directory?". What argument does this require? I've tried a variety of arguments including the julia install directory (/usr/local/Cellar/julia/HEAD/bin/julia), my home directory, location of julia history, and location of julia packages. All of these produce an error that says cannot read .juliahistory. Do you have any idea how to fix this?
Thanks!

Ross Boylan

unread,
Aug 1, 2014, 2:57:29 PM8/1/14
to julia...@googlegroups.com, ndbe...@gmail.com
You should answer with whatever directory you'd like to work in for your
project. You can just hit enter, which I think leaves you in whatever
directory emacs thinks you have current.

The can't read .juliahistory message is normal the first time through.
Once you've worked in a directory it will have a .juliahistory (unless
that part of ESS isn't working--I haven't been paying attention to it).

Ross Boylan


Sarvagnan Subramanian

unread,
Aug 2, 2014, 9:11:07 AM8/2/14
to julia...@googlegroups.com, ndbe...@gmail.com
Ah thanks! One last question, what should the input be for "(setq inferior-julia-program-name)" in .emacs? Should this be the location of the julia binary?

Douglas Bates

unread,
Aug 2, 2014, 9:53:20 AM8/2/14
to julia...@googlegroups.com
Yes.

Sarvagnan Subramanian

unread,
Aug 2, 2014, 10:50:42 AM8/2/14
to julia...@googlegroups.com
Thanks!

On Saturday, August 2, 2014 7:23:20 PM UTC+5:30, Douglas Bates wrote:
Yes.

Ross Boylan

unread,
Aug 2, 2014, 2:13:01 PM8/2/14
to julia...@googlegroups.com, ndbe...@gmail.com
It should be the complete path for the binary, e.g.,
(setq inferior-julia-program-name "/usr/local/bin/julia")

Ross

Boris Kheyfets

unread,
Mar 24, 2015, 9:29:38 AM3/24/15
to julia...@googlegroups.com, ndbe...@gmail.com
it seems (require 'julia-mode) will interfere with ess-julia.
wow, that sucks. I find-replaced julia-mode to ess-julia-mode in ESS/lisp/ess-julia.el seems to be working so far.

Ista Zahn

unread,
Mar 24, 2015, 10:48:59 AM3/24/15
to julia...@googlegroups.com, ndbe...@gmail.com
On Tue, Mar 24, 2015 at 5:07 AM, Boris Kheyfets <kheyf...@gmail.com> wrote:
>> it seems (require 'julia-mode) will interfere with ess-julia.
>
> wow, that sucks.
Well, it cannot be otherwise as long as both julia-mode and ess-julia
are major modes. Only one major mode can be active at a time.

There are plans on the ESS side to integrate julia-mode -- see
https://github.com/emacs-ess/ESS/pull/122

Best,
Ista

harven

unread,
Apr 7, 2016, 3:28:26 PM4/7/16
to julia-users, ndbe...@gmail.com


Le vendredi 1 août 2014 20:32:01 UTC+2, Sarvagnan a écrit :
I'd like to pose a question on the ess config itself. I haven't been able to find a satisfactory explanation anywhere. What directory do you need to provide in the seta inferior-julia-program-name field? When starting julia with M-x julia, this question comes up "ESS (*julia*) starting data directory?". What argument does this require? I've tried a variety of arguments including the julia install directory (/usr/local/Cellar/julia/HEAD/bin/julia), my home directory, location of julia history, and location of julia packages. All of these produce an error that says cannot read .juliahistory. Do you have any idea how to fix this?
Thanks!

I am a bit late, but since google points to that thread, you can put in your emacs init file

(setq ess-ask-for-ess-directory nil)

if you don't want to be asked for a starting data directory. You will start from the directory given by the variable ess-directory or from the current directory if this variable is not set.
 
Reply all
Reply to author
Forward
0 new messages