A while back I'd written about looking up Javadocs from Clojure mode buffers. I got some good feedback on that post, so I thought I'd try and expand on that and see if I could integrate other Clojure documentation sources into a similar workflow.
Looking up Clojure doc strings within Emacs is really easy. In any
Clojure code buffer, you can place your cursor at a symbol and use
C-c C-d d or
M-x slime-describe-symbol to bring up the function or
var doc string.
Previously, I'd made a
slime-javadoc command that could be
configured to search external Javadoc sources only. However, that
mechanism could be applied more generally to more sources.
The new command
M-x clojuredocs, can show either Javadocs for Java
classes, or goes to the excellent clojuredocs.org site for
documentation specific to
clojure.core and a few other namespaces
ring), or eventually fallsback to a simple Google search.
So, after connecting to a Clojure instance (via
slime-connect), I can invoke
M-x clojuredocs on any symbol and get
back some relevant documentation or at the least som helpful pointers
I've committed an initial version of the Emacs Lisp code into the following github repo:
Feedback and bug reports are most welcome.