Skip to content
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

edit doesn't work with EDITOR set to 'emacsclient -t' (or other values with options) #8120

Closed
ccyip opened this issue Aug 25, 2014 · 3 comments

Comments

@ccyip
Copy link

ccyip commented Aug 25, 2014

An example:

export EDITOR='emacsclient -t' # or other values with options, like 'emacs -nw'

edit function throws an error.

julia> edit(+)
ERROR: could not spawn `'emacsclient -t' +36 /usr/bin/../share/julia/base/bool.jl`: no such file or directory (ENOENT)
 in _jl_spawn at process.jl:217
 in spawn at process.jl:348
 in edit at interactiveutil.jl:35
 in edit at interactiveutil.jl:54

Apparently, edit considers emacsclient -t as a whole file name.

In base/interactiveutil.jl,

if beginswith(edname, "emacs")
    spawn(`$edpath +$line $file`)

Simply wrapping edpath with shell_split fixes this problem.

if beginswith(edname, "emacs")
    spawn(`$(shell_split(edpath)) +$line $file`)

And it also works in the case of path with spaces, as long as you set EDITOR properly. For example,

export EDITOR='/path\ with\ spaces/emacs -nw'

I don't see any drawbacks so far. In fact, I'm wondering why not just wrap every edpath with shell_split.
Do I miss something?

@tkelman
Copy link
Contributor

tkelman commented Dec 15, 2014

Sorry no one responded to this @stoolye. Is this still an issue? Somewhat related to #9331

@ccyip
Copy link
Author

ccyip commented Dec 15, 2014

Yes, it's still an issue, though I set JULIA_EDITOR to emacsclient to workaround it for now.
It will be nice to see it get fixed.

rsrock added a commit to rsrock/julia that referenced this issue Mar 13, 2015
@nolta
Copy link
Member

nolta commented Sep 22, 2015

Fixed by #13032

@nolta nolta closed this as completed Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants