Setting up Clojure with Slime on Ubuntu


Emacs and Slime are installed. If you have Slime installed aready via the Package Manager read the following else skip over the next section.


Originally, when I started to setup Clojure with Slime I has already installed Slime through the Package Manager. This worked fine with sbcl but it doesn't with clojure. It seems that a newer version is available that works fine. So, if you have the same setup uninstall the Slime installed through the Package manager and restart Emacs. Then install Slime with the following.

$ cd /opt
    $ git clone git://


The emacs mode to handle clojure files

$ cd /opt
    $ git clone git://


swank-clojure is the server-side backend of slime.

$ cd /opt
    $ git clone git://

Configure Emacs

;; clojure-mode
    (add-to-list 'load-path "/opt/clojure-mode")
    (require 'clojure-mode)

    ;; swank-clojure
    (add-to-list 'load-path "/opt/swank-clojure/src/emacs")

    (setq swank-clojure-jar-path "/opt/clojure/clojure.jar"
    swank-clojure-extra-classpaths (list

    (require 'swank-clojure-autoload)

    ;; slime
    (eval-after-load "slime"
    '(progn (slime-setup '(slime-repl))))
    (add-to-list 'load-path "/opt/slime")
    (require 'slime)

Subscribe Request