tl;dr
If you’re already proficient with elisp and emacs you can see my config file here and everything I’m using was installed via package.el from the marmalade repo.
Setting up Aquamacs
Configuring emacs is getting easier and easier due to package.el and Marmalade.
The first step is to install package.el if your’e using emacs 23 or lower (package.el will be included with emacs 24).
$ cd ~/Library/Preferences/Aquamacs\ Emacs/
$ curl -o package.el http://repo.or.cz/w/emacs.git/blob_plain/1a0a666f941c99882093d7bd08ced15033bc3f0c:/lisp/emacs-lisp/package.elNext, edit ~/Library/Preferences/Aquamacs Emacs/Preferences.el
Restart Aquamacs. You can now view all packages in marmalade with M-x package-list-packages and install them by click on the name which will open a pop up and clicking on ‘install’.
Here are the packages I have installed.
- anything
- anything-config
- anything-match-plugin
- coffee-mode
- clojurescript-mode
- haml-mode
- sass-mode
- scss-mode
- starter-kit-ruby
- starter-kit-js
- color-theme
- color-theme-sanityinc-solarized
A quick rundown of my favorite features.
anything
I use anything in place of switch-buffer, try it’s great. I’ve also added the anything-git-project function which will match against all files in the git repo that the current buffer is in. This is like CMD-t in textmate.
ido
I’ve made ido much more friendly. Seeing is believing, so try it.
themes
I haven’t found the perfect theme, but color-theme-sanityinc-solarized is very close.
Now it’s clojure time
First install leiningen, instructions are here
Install the swank-clojure plugin
$ lein plugin install swank-clojure 1.3.2Install clojure-mode via package.el (M-x package-list-packages)
Now let’s create a new clojure project with lein
$ lein new test-project
$ cd test-project
$ lein depsIn Aquamacs, open one of the clojure files from the project then run (this can take a few seconds)
M-x clojure-jack-in
Yay, you’re now in slime with clojure and the classpath for your lein deps setup properly. I’m a big fan of paredit and have a hard time writing lisp without it these days. Give it a try if you aren’t familiar with it, but it will take a day or two to get used to it. This Cheatsheet will help.
Lastly, you can see my entire emacs configuration here