[ESS] ess-julia.el

Vitalie Spinu spinuvit at gmail.com
Sat Feb 23 14:48:12 CET 2013


>> Jay Kerns <gjkernsysu at gmail.com>
>> on Sat, 23 Feb 2013 08:07:45 -0500 wrote:

> Dear ESS-help,
> I have a few comments and questions about ess-julia.el:

> 2. I notice after M-x julia there is a 'load' statement which issues a
> warning about being deprecated and that 'require' should be used
> instead.  I found the place in ess-julia.el where that is (there looks
> to be 2 places, actually), and I fixed those, but I haven't committed
> to my fork yet because I wanted to ask about #3 first.

Hm, I thought you have done with that and I was so much in a hurry that
I have already merged it :)

Thanks.

> 3. I notice after M-x julia that the process doesn't echo to the
> buffer.  I understand that in the iMenu there is a checkmark for
> "Process Echoes" and I can get the process to echo.  This is
> different, of course, from R (and gretl, it appears) which echo the
> process by default.

> I tracked it down to the following line in ess-inf.el:

> Line 2194 of /lisp/ess-inf.el
> (not (member ess-language '("SAS" "XLS" "OMG" "julia")))) ;; these don't echo

> So it looks like somebody deliberately wanted julia not to echo.  My
> question is, "Why?"  

Echoing in process buffer is a bit different than "echoing" when sending
code form a script buffer. The first one is just a logical indicating
whether the process actually echoes it's input. For example, 

   > print("foo")

would produce in *R* buffer

   > print("foo")
   print("foo")
   [1] "foo"

There are some processes that do that, for example S+. Julia and R
don't, so there is (in principle) no need for that. This being a main
idea, the story is not that simple with ESS, which intentionally sets
comint-process-echoes dynamically depending on the value of
ess-eval-visibly. This is in order to match the behavior that you get
when evaluating directly in *R* buffer, and when sending code from
script buffers.

Your concern has to do with something else though. Correct me if I am
wrong, but it is the thing that we call "(in)visible evaluation" that
bothers you. That is, the evaluated code from the script buffer is not
echoed in the inferior buffer.

Currently ess-julia completely ignores ess-eval-visibly and that is
historical. Back in May, julia was not supporting accumulation of
commands. So if you send an incomplete commmand, julia would not wait
for the terminal input and would throw an error.

I think this has been solved on julia side in meanwhile and it is quite
likely that it is possible to make ess-julia behave pretty much like
ess-R does. I will look into it once my installation of julia is
complete.

> By the way, I've already tried numerous global settings, but since
> comint-process-echoes is buffer local that line "2194" overrides
> everything I've tried so far.

Yes, it is buffer local and you can set it in ess-julia-post-run-hook
but it will not give you what you want :)

    Vitalie



More information about the ESS-help mailing list