I defined the environment variable JULIA_EDITOR=“gedit” in my startup.jl file, but edit(path) or edit(fn) still open with nano:
shell> echo $JULIA_EDITOR
gedit
julia> edit(
"~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/lapack.jl"
) # this will open nano
julia> edit(LAPACK.gels!, 1) # same
For me, on 1.10, if I do that (in the REPL) I get:
julia> @edit println("Hello world!")
ERROR: IOError: could not spawn `gedit +4:0 /home/pharaldsson/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/base/coreio.jl`: no such file or directory (ENOENT)
I think that simply means it would be “working”, only that “no such file” refers to gedit, i.e. it not in PATH.
I get the same with:
julia> edit("/home/pharaldsson/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/base/coreio.jl")
ERROR: IOError: could not spawn `gedit +0:0 /home/pharaldsson/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/base/coreio.jl`: no such file or directory (ENOENT)
so at least there’s no difference.
Note for me, then:
shell> echo $JULIA_EDITOR
ERROR: UndefVarError: `JULIA_EDITOR` not defined
but:
shell> bash
pharaldsson@ryksugan:~$ echo $JULIA_EDITOR
gedit