clojure-mode and slime

As a long time user of SLIME I was a bit disappointed to see clojure-mode 2.0 drop support for it in favor of nrepl. I looked into nrepl but found it to be not as feature complete as SLIME, at present. Also, I still work on some sizeable Common Lisp code, which relies entirely on SLIME, and I want to be able leverage any tooling work I do across all my projects – so SLIME wins.

As it turns out, it wasn't at all difficult to resurrect the SLIME integration code from clojure-mode 1.x and load it alongside the newer clojure-mode.

I've committed the clojure-mode-slime.el Emacs Lisp code into the following repo, along with some other Clojure/Emacs hacks:

http://github.com/kriyative/clojure-emacs-hacks

I hope this is useful to other SLIME die-hards in the Clojure community as well. Feedback and bug reports are most welcome.

clojure, emacs, and docs redux

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.

view javadocs in emacs/w3m (click to view full size)

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 (such as ring), or eventually fallsback to a simple Google search.

So, after connecting to a Clojure instance (via clojure-jack-in or slime-connect), I can invoke M-x clojuredocs on any symbol and get back some relevant documentation or at the least som helpful pointers from Google.

I've committed an initial version of the Emacs Lisp code into the following github repo:

http://github.com/kriyative/clojure-emacs-hacks

Feedback and bug reports are most welcome.