I am trying to integrate julia with ESS (http://ess.r-project.org/), as
it offers sub-process interaction (such as sending functions, lines,
regions directly form the editing buffer in emacs). But I am stuck with
making multiline input to work.
First of all "julia" exec is not working at all. One line input works
fine with julia-release-basic.
Multiline problem is as follows:
Start emacs shell (M-x shell), start julia-release-basic, and run:
function f(x,y)
x + y
end
You will get:
julia> function f(x,y)
x + y
end
not supported
julia> x not defined
julia> syntax error: unexpected end
Which means that julia sees each line as a complete input.
I've tried sending input to subprocess both with \n and \r, same
result.
Any ideas?
Thanks,
Vitalie.
Hi,I am trying to integrate julia with ESS (http://ess.r-project.org/), as
it offers sub-process interaction (such as sending functions, lines,
regions directly form the editing buffer in emacs). But I am stuck with
making multiline input to work.First of all "julia" exec is not working at all. One line input works
fine with julia-release-basic.
Multiline problem is as followStart emacs shell (M-x shell), start julia-release-basic, and run:
function f(x,y)
x + y
end
You will get:
julia> function f(x,y)
x + y
end
not supported
julia> x not defined
julia> syntax error: unexpected end
Which means that julia sees each line as a complete input.
I've tried sending input to subprocess both with \n and \r, same
result.Any ideas?
Thanks,
Vitalie.
Hi,I am trying to integrate julia with ESS (http://ess.r-project.org/), as
it offers sub-process interaction (such as sending functions, lines,
regions directly form the editing buffer in emacs). But I am stuck with
making multiline input to work.First of all "julia" exec is not working at all. One line input works
fine with julia-release-basic.
> Just a guess, do you see the same result with julia and/or
> julia-release-readline?
Just julia executable is not working at all. Once started, it gets stuck.
> I assume you are aware of the file contrib/julia-mode.el in the Julia
> source tree as an editing mode.
Yes, I am basing on that one.
> Linking the ESS-style running an inferior process with the editing
> mode would be wonderful.
Plenty of functionality is already in place in ESS. Things like
completions, eldoc and interactive help could be done in a day or
so. Just to figure out what's the problem with "\n".
It's some sort of IO glitch in Julia. Simple proc spawning like this:
(setq proc (start-process "julia" "julia"
"~/VC/julia/julia-release-basic"))
(process-send-string proc "function next(s::IntSet, i)\n")
gives "julia> not supported".
By the way, it would be nice to have a secondary prompt for incomplete
input, something like "+ " at bol. It's easier to track input/output
regions this way.
Vitalie.
-viral
No I didn't figured it out, just implemented an workaround in ESS --
save to a temp file and load. It works fine for sending chunks of code
to julia sub-process. It doesn't work for line by line accumulation of
an input, both from script and process buffers.
As far as I understand the wait-till-valid-input mechanism is
implemented. Would it be possible to add it to julia process running
with no readline facility?
Thanks.
>>>> Stefan Karpinski <ste...@karpinski.org>