In the emacs interface julia-repl.el currently we access docstrings with
@docs, eg when the user requests help for
is sent to the Julia REPL.
But this does not work for keywords like
continue, among other things. What’s the best way to replicate what
You can intercept the output with:
buf = IOBuffer()
help = Core.eval(Main, REPL.helpmode(buf, "break"))
helpstdout = String(take!(buf))
helpstdout string is the search output for related things, e.g.
search: break AbstractVecOrMat, and the
help object is what you
display to see the actual help (typically it is a
Markdown.MD object, but you can of course
show it as
Just out of curiosity- why is it not possible to have julia-repl just send “? foo” to the Julia REPL (or what are the disadvantages of this? )
This seems to work (at least with N=1 test cases ) , but probably I’m missing something about the cases when one needs bracketed pasting ?
(defun julia-repl-doc2 ()
"Documentation for symbol at point."
(julia-repl--send-string (concat "? " (thing-at-point 'symbol t)) nil t))
It should be feasible, I just probably need to check and restore the char/line mode.