-
-
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
methods link to code #4952
Comments
At least in IJulia, the URLs can be used. Perhaps mimetypes is the solution here? |
All that is needed is to define a |
(Presumably you would link to the Julia source on github, for functions in Base? Ideally you would link to the specific commit of Julia that is being executed, but I'm not sure how to get this information within Julia. Similarly, for things in the Pkg directory you could try to query |
julia> Base.BUILD_INFO.commit
"dc60e18d20b999d80ea2f81552d90a61555efa2f" The only trouble with using this blindly is if you're on a local commit that isn't on GitHub. It would be great to systematically show all line numbers as links – in errors, etc. This might make me switch from using the repl to IJulia for day-to-day work. |
@StefanKarpinski, I thought about that, but I suspect that developers working on local commits is not the norm. ( |
You have One option might be to include the relevant function definition in a hidden |
Here is a prototype implementation (just paste it into your IJulia window to try it out), which links to github for functions in
For expedience, I'm just linking the method name to the source code. It would be better to attach the link to the Sample output (though it is more interesting if you try out the links in a live IJulia session): What do you think of this approach to obtaining the links? |
I'd make |
@nalimilan, as I explained, linking the function name was merely a temporary expedience. I agree that filename:line should be the link, but to do that I need to refactor some code in Julia Base. |
add text/html writemime for MethodList and Method (fix #4952)
* upstream/master: (89 commits) fix JuliaLang#5225 update pcre fix off-by-1 in isqrt. closes JuliaLang#4884 Add more keywords to ctags regex, plus README annotate the types of arguments for derived trigonometric & hyperbolic functions fix doc for && and || and update helpdb only show ccall literal address warning in imaging mode. closes JuliaLang#5215 minor update of hypot to ensure consistency of output types Fix JuliaLang#5217 silence compiler warning hopefully more robust way of getting github URL (don't assume module name is Pkg name) add text/html writemime for MethodList and Method (fix JuliaLang#4952) update NEWS doc: `import M: single,name` syntax, close JuliaLang#5214 clean up native finalizers code specialized abs2 for bool remove use of callback API in REPL Some error message cleanup to fix segfault when transposing sparse vector with illegal values. test/git*.jl: don't use `echo` to read-and-write from processes. test/git*.jl: don't use `echo` to read-and-write from processes. ...
methods already gives line numbers
would be nice to have hyperlinks
these days browsers and even pdf files can have hyperlinks
not sure if terminals can as well
but i'd settle for a url if need be
The text was updated successfully, but these errors were encountered: