-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function edit seems to create bad path for sublime text option (i.e. "subl") in interactiveutil.jl #11305
Comments
Sorry! |
Try using two backslashes:
|
What is strange is when I do not define ENV["JULIA_EDITOR"], when I use edit it opens up "text edit" because it is the default editor that is used when the -t option is used in "spawn( |
I just submitted a pull request (#11329) to add: I am not sure how to send a pull request for changes in 0.3.8 |
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")
The text was updated successfully, but these errors were encountered: