-
-
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
Fix so windows opens the default editor when @edit
is used
#8725
Conversation
Thanks! But this is actually still not completely correct (not your fault, the code was already wrong), as the files are not guaranteed to be in that place. It should instead use the |
No problem. I was a bit too quick with the pull-request. My actual quest was to make |
@edit
is used
We have no problem with "early and often!" If you are making a PR and you know that it's not ready yet, it's conventional to prefix the title with "WIP" (Work In Progress), but we certainly don't expect everything to be 100% ready when it's proposed. Thanks for contributing! |
Okay, I am finished now, until some of you guys come up with any wanted changes:) |
It is now fixed:) |
Thanks! Could you squash these commits into one (using |
Looks like something went wrong. You have added commits instead of squashing them into one. Use |
Ah, and please rewrite the commit message so that it makes sense out of the context of this PR (just like you did in the original commit). |
fc40e83
to
d3892bb
Compare
wow, I succeeded should I also squash the last one away? As you probably figured out I am not that good at git. |
Yes, please! |
d3892bb
to
2da44c5
Compare
Fixed it, then I got schooled in git + VI:) |
Sorry, there still are two commits. :-) |
Are there? 2da44c5 is the new commit as I see only se here. |
OK, now it's fine. Let's wait for Travis to finish the tests. |
It should be backported as well right? |
@@ -24,6 +24,7 @@ function edit(file::String, line::Integer) | |||
f = find_source_file(file) | |||
f != nothing && (file = f) | |||
end | |||
no_line_msg = "Uknown editor: no line number information passed.\nThe method is defined at line $line." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight typo.
printed to the user when it is not passed to the editor.
fa684ec
to
572c69c
Compare
Fixed and squashed. |
despite the failed name mangling that will probably result if the path has a space or quote character in it, this is probably OK to merge anyways. spawn should really have the |
@vtjnash how should the |
Fix so windows opens the default editor when `@edit` is used
@dhoegh Backports are very welcome! Anyone can submit pull requests against the release-0.3 branch, but if you don't have time, I've gotten some experience so I'll gladly do it for you. Unfortunately this PR doesn't include tests so I can't automatically test whether the issue is really fixed there as well. |
Hi brk00 could you make the back port together with the rest of the changes you have in 8738? If you just ping me on the backport then I will check it is working:) |
I have found one problem with backporting |
Are you sure? It's defined here: https://github.com/JuliaLang/julia/blob/release-0.3/base/Makefile#L59 But you need to write |
If I write in the interpreter:
and I also tried it in write |
@nalimilan |
Thanks for the info @ivarne. |
But this has to be fixed with a new 0.3.X release, so you should use the latest release-0.3 commit to base the pull request on. |
But should I also compile source? I haven't done that before and I would prefer if I could avoid it. |
Compiling Julia from source is usually a requirement when you want to do changes to Julia that aren't trivial typo fixes. This fix looks like it is about on the boundary of trivial, so I think you'll likely be able to do it and have someone else test to ensure that it works. It would be nice to note in a PR that you haven't really tested that it works, so that you motivate us to do a more thorough review before merging. |
I had tested on 0.4 on a one day old nightly where I precompiled Base. So I had tested it I have just not compiled Julia from source. |
On windows, you can test a patch to base by running the prepare-Julia-env.bat script after making the changes and deleting sys.ji |
That was what I did, but I can't do it for 0.3.x since there is not made nightlies only 0.3.1. |
If you prepare a PR against 0.3 we can test it for you if you want -- though compiling Julia from scratch is a valuable experience for your next PR. ;-) |
Also, not hard. Clone and run |
He's on Windows. So have to be careful to set up an environment following the steps in https://github.com/JuliaLang/julia/blob/master/README.windows.md Or you can do Cygwin-to-MinGW cross-compilation, which I still need to document. The required packages are listed here: https://github.com/staticfloat/julia-vagrant/pull/2/files |
…efault editor + line number is printed to the user when it is not passed to the editor.
Backport of #8725 Fix so `@edit` works on windows with the default editor.
This fixes so windows can open source files with
@edit
macro using the default editor and I have added a notice to the user where to find the function when no line number info is sent to the editor.