-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I am using Julia 0.3.8 on a mac with OS 10.10.3. I am trying to define sublime text as my editor for julia when using @edit so I start by defining:
ENV["JULIA_EDITOR"]="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
however when I do: @edit rand()
I get this error:
ERROR: could not spawn /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin/../share/julia/base/random.jl:90: no such file or directory (ENOENT)
in _jl_spawn at process.jl:217
in spawn at /Applications/Julia-0.3.8.app/Contents/Resources/julia/lib/julia/sys.dylib
in edit at interactiveutil.jl:35
in edit at interactiveutil.jl:56
as I was digging around edit(file::String, line::Integer)
I discovered that when it decides to use "subl" on line 35 of interactiveutil.jl it calls:
interactive.jl:35 spawn($(shell_split(edpath)) $file:$line)
this creates:
/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin/../share/julia/base/random.jl:90
which cannot be spawned because it cannot find the directory
i discovered that if don't call the shell_split function and instead call:
spawn($edpath $file:$line)
it works I think because it create:
'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin/../share/julia/base/random.jl:123
this difference is the ticks around the path to subl which doesn't exist in the previous version with shell_split
I did this by hand. I wasn't sure how to change the code in base to get it to work. I think this is a bug but I am not sure and I am not sure if this is the correct fix. I think shell_split was being used because the path name (at least in OS X it has a space in it i.e. "Sublime Text.app")