OK, yeah, I had the same problem when I had EDITOR="emacs -nw", so that it didn't launch the GUI but just opened up in the terminal.
Maybe we should make an issue and ask that edit be made a little more clever. In your case, it could perhaps detect that there isn't a windowing system available, and then use run instead of spawn. And in my case, perhaps it could notice the -nw flag and use run instead of spawn. On Thursday, April 14, 2016 at 10:09:55 AM UTC-5, Josef Sachs wrote: > > >>>>> On Thu, 14 Apr 2016 07:46:18 -0700 (PDT), daniel matz said: > > > I'm on Mac OS X with Julia 0.4.3. The edit function is defined in > > interactiveutil.jl > > <https://github.com/JuliaLang/julia/blob/master/base/interactiveutil.jl>. > > > > What is the output if you run this at the REPL: > > > Base.editor() > > (when I unset JULIA_EDITOR) > Base.editor() == ["emacs"] > > > What happens if you do this at the REPL: > > > run(`emacs Makefile`) > > That runs emacs until I exit it, at which time I am back at the Julia > REPL. > That is what I want edit() to do. > > > If you notice in the definition of edit that I linked to, when the > > editor is emacs, it uses spawn instead of run. > > Yes, that's the problem. I want emacs to be invoked with run(), not with > spawn(). My JULIA_EDITOR=mvim (where mvim is a symbolic link to emacs) > kludge works, but it's a kludge. >