title: Setting up SLIME & Inferior-Lisp  for Clojure in Emacs
body: <h1>SLIME</h1>
  
  <p>I'm pretty new to both Clojure &amp; emacs and I've been trying to set up SLIME for Clojure.  The <a href="http://dev.clojure.org/display/doc/Getting+Started+with+Emacs" rel="nofollow">official documentation</a> implicitly assumes you know what your doing with emacs.  There isn't just a bunch of code you can stick into your configuration files.  Since <strong>I am interested in Clojure for Data Analysis</strong>, I don't really want to deal with Leiningen if at all possible, but I want the dynamic environment that slime provides.</p>
  
  <p>I have installed Clojure from git in <code>/opt/clojure/</code> and clojure-contrib in <code>/opt/clojure-contrib</code> and I can get a repl.  I installed swank-clojure, clojure-mode, and slime from github in `~/.bin following <a href="http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html" rel="nofollow">this tutorial</a>.  I changed a few things around when this wasn't working by adding some stuff from the comments section of the official documentation.</p>
  
  <p>When I start slime with <code>M-x slime</code> I get a continuous <code>Polling "/tmp/slime.14113".. (Abort with 'M-x slime-abort-connection'.)</code>.</p>
  
  <p>Here is my <strong>init-clj.el</strong>:</p>
  
  <pre><code>;; clojure-mode
  (add-to-list 'load-path "~/.bin/clojure-mode")
  
  
  ;; swank-clojure
  (add-to-list 'load-path "~/.bin/swank-clojure")
  
  (setq swank-clojure-jar-path "/opt/clojure/clojure.jar"
    swank-clojure-extra-classpaths (list
                    "~/.bin/swank-clojure/src/swank"
                    "/opt/clojure/clojure-contrib/target/clojure-contrib-1.2.0-SNAPSHOT.jar"))
  
  (require 'swank-clojure)
  
  ;; slime
  (eval-after-load "slime" 
    '(progn (slime-setup '(slime-repl))))
  
  (add-to-list 'load-path "~/.bin/slime")
  (require 'slime)
  (eval-after-load 'slime '(setq slime-protocol-version 'ignore))
    (slime-setup '(slime-repl))
  (require 'clojure-mode)
  (require 'clojure-test-mode)
  </code></pre>
  
  <p>Here is the error I get when I call it when <strong>ants.clj</strong> is open:</p>
  
  <pre><code>(progn (load "/home/kca/.bin/slime/swank-loader.lisp" :verbose t) (funcall (read- from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.14113" :coding-system "iso-latin-1-unix"))
  
  Clojure 1.2.0-master-SNAPSHOT
  user=&gt; java.lang.Exception: Unable to resolve symbol: progn in this context (NO_SOURCE_FILE:1)
  </code></pre>
  
  <h1>Inferior Lisp</h1>
  
  <p>I made a script in <code>.bin/</code> called clj-repl that holds the java command to start a repl.  I then M-x set-variable inferior-lisp-program /home/wdkrnls/.bin/clj-repl.  Emacs complains its the wrong type.</p>