Hacker News new | past | comments | ask | show | jobs | submit login
Clojure + Emacs (mdelaurentis.tumblr.com)
50 points by kyleburton on March 2, 2010 | hide | past | favorite | 11 comments



This is great timing for me. I sat down a few nights ago with the intention of learning Clojure, but ended up spending the whole evening wrestling with Emacs and SLIME, trying and failing to get a usable REPL. Perhaps I should have given up and just used the REPL in a terminal window, but I already know from my Common Lisp tinkering how useful it is to have SLIME.

On my adventures I found plenty of blog posts like this one, but none of them very recent, and I couldn't get any of them to work. Hopefully I'll have better luck this time, with a guide matching the current state of Clojure's distribution.


The built-in Lisp mode for editing and the inferior-lisp mode REPL give you 80 percent of SLIME without the installation pain.


I used Emacs Starter Kit (http://github.com/technomancy/emacs-starter-kit) and it set everything up for me in seconds.


I think these days the easiest way to getting a working Clojure+SLIME setup is to use ELPA.


Emacs Starter Kit includes ELPA and a bunch packages from there: it is precisely just a starter kit with some setup made for you and some "skeleton" for your .emacs.d.

So, if you already have your Emacs and ELPA setup, it's easier to just install a couple packages, but if you are starting from scratch with Emacs (as I was), the starter kit is better.


By far. And use leiningen swank to configure the classpath for your REPL when working on a project.

http://wiki.github.com/technomancy/leiningen/emacs-integrati...


I should add that I'm using Aquamacs, and avoided the Emacs Starter Kit due to the following note on the page you linked:

"Some have reported getting it to work with Aquamacs. However, since Aquamacs is not portable, it's difficult to test in it, and breakage is common."


I have some instructions that work equally for Carbon Emacs or Aquamacs here, http://www.formconstant.net/diagrams/?p=54.

Setting up Clojure on OS X is really easy now.


I've been using it with Aquamacs without difficulty, for whatever it's worth.


My .emacs is based on the emacs-starter-kit as well, its really helpful to hit the ground running if you do not have a configured emacs yet.


With M-x swank-clojure-project, you don't have to slime-connect, just provide a project path.

http://github.com/technomancy/swank-clojure




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: