Steven Deobald

Read more by Steven on Medium

zero to emacs in under 5 minutes

You want to write Clojure. You want to write it in Emacs. Here's how.

1. Grab Leiningen.

mkdir -p ~/bin
cd ~/bin
wget https://raw.github.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
echo 'PATH=$PATH:~/bin' >> ~/.profile
lein self-install


This will get you leiningen, Clojure's build tool.

2. Grab Clojure.


cd ~/code
lein new my-first-clojure-project
cd my-first-clojure-project
lein deps

`lein deps` will bring down a local copy of Clojure. Look in ~/code/my-first-clojure-project/lib !

3. Grab swank-clojure.


lein plugin install swank-clojure 1.4.0

This gives you the `clojure-jack-in` command in emacs. It's your samurai sword.

4. Grab a healthy .emacs config.

mv ~/.emacs ~/.emacs.bak
mv ~/.emacs.d ~/.emacs.d.bak
git clone git@github.com:c42/dotfiles.git
ln -s dotfiles/emacs.d ~/.emacs.d
5. Grab an emacs.

Ubuntu: https://launchpad.net/~cassou/+archive/emacs
OS X: https://emacsformacosx.com/emacs-builds/Emacs-pretest-24.0.94-universal-10.6.8.dmg

Running emacs for the first time will automatically install all the packages you need. Now run your first emacs repl!
M-x clojure-jack-in

TADA!