Kristian Kristensen’s Blog


Installing Clojure, SLIME in Emacs Via ELPA on Windows With a Bit on Swank

Posted in Clojure,Code by Kristian Kristensen on the March 28th, 2011

I’ve been trying to setup Emacs for Clojure development. There’s a bunch of information about this online, but I couldn’t get it to work. It seems most of it is outdated between Emacs, ELPA, SLIME and Swank. So I thought it post the exact steps I took and the links I used to get it to work.
I’m using Emacs 23 on Windows 7 64-bit.

  • Install ELPA, copy the snippet found at the link into the *scratch* buffer and eval it (M-x eval-buffer).
  • Open package.el which is downloaded during the ELPA isntall. It’s probably located in “~/.emacs.d/elpa/”. Delete the contents of it and replace it with what’s found here. Then re-evaluate the buffer.
  • Add the Marmalade Repository to your .emacs file by including:

    (add-to-list ‘package-archives
    ‘("marmalade" . "http://marmalade-repo.org/packages/") t)

  • Close and restart Emacs
  • Hit M-x package-list-packages
  • It should show you the list of packages available. Find “slime-repl”, and hit “i” to include it. Hit “x” to download and install all selected packages. You want to repeat this process until the following packages are installed:
    • slime-repl
    • clojure-mode
    • paredit
    • slime
  • Restart Emacs, just in case.

Now you should have the updated packages for running Clojure in Emacs.

The problem seems to be that the repo and package.el found at the original ELPA site is not longer being maintained. ELPA is being merged into Emacs 24 and so it’s in a bit of an in between state. The package.el that’s being downloaded from github is a copy of the one found in the Emacs 24 repo. I’ve also tried that file directly, but it failed on my Emacs 23 installation. Also the method for running a Clojure REPL inside of Emacs using Swank-clojure seems to be outdated. That tripped me up as well.

  • If you like my writing you should subscribe to my RSS feed.

    One Response to 'Installing Clojure, SLIME in Emacs Via ELPA on Windows With a Bit on Swank'

    Subscribe to comments with RSS or TrackBack to 'Installing Clojure, SLIME in Emacs Via ELPA on Windows With a Bit on Swank'.


    1. on June 2nd, 2011 at 3:44 am

      [...] Zen Coding Prosthetic Conscience Post to WordPress blogs with Emacs & Org-mode | Nethazard.net Kristian Kristensen’s Blog » Installing Clojure, SLIME in Emacs Via ELPA on Windows With a Bit on… Ben’s Journal: 11 Concepts The Emacs Newbie Should [...]

    Leave a Reply

    You must be logged in to post a comment.