Skip navigation

More than anything, this post succinctly describes how to get up and running with Clojure + Emacs. Virtually no thinking is required if you are working from a default install of Ubuntu, and not much more is required for any linux distro – you just need to know how to use your package manager.

Furthermore, if any of these steps would cause you trouble (deleting .emacs* comes to mind), you probably already know how to handle it.

  • 1. Install emacs, git, ant, and a java jdk (distro specific).
  • Ubuntu: sudo aptitude install emacs git-core ant openjdk-6-jdk

  • 2. Install Emacs Lisp Package Archive (ELPA)
  • – Evaluate the install code
    – OR evaluate at the cli (warning: rm -Rf ~/.emacs* might not do what you want)
    rm -Rf ~/.emacs*
    git clone git://github.com/technomancy/emacs-starter-kit.git ~/.emacs.d

  • 3. Use ELPA to install clojure-mode
  • emacs
    M-x package-install (M-x corresponds to ALT-x in emacs)

  • 4. Install clojure (using a handy tool in clojure-mode)
  • M-x clojure-install

  • 5. Do the following to allow slime to start once clojure-mode is activated
  • echo "(eval-after-load 'clojure-mode '(clojure-slime-config))" >> ~/.emacs.d/user'name.el

  • Run Clojure!
  • emacs foo.clj
    M-x slime

    Other notes:
    – For cli setup, see Tim Riddell’s tutorials – I recommend the bash startup alias, in particular.
    – For a longer explanation, see Phil Hagelberg’s post.

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: