Install Cask and Pallet to manage Emacs Packages

 06 Mar 2014

 0 Comments

The package management that is built into emacs has gotten a lot better over the past few years (While I’ve been away) and the Melpa repository of packages is outstanding. Tonight I decided to take the next step and use some packages that help organize and keep my packages up to date: Cask and Pallet. You can see a commit of my changes on github.

Cask allows you to have a file that specifies emacs packages and will install them for you. This is like the bundler project for ruby gems. Pallet takes this one step further and makes it so that when you install or remove a package directly in emacs, the Cask file is updated automatically. This makes for a perfect setup and allowed me to remove a bunch of lines from my init.el file. Next time I load my emacs config on a new computer I do need to install cask… but luckily after that all of my packages will install for me automatically.

When I got to work and needed to setup my environment it was a matter of the following shell commands:

# Update my config
git pull

# Install Cask
curl -fsSkL https://raw.github.com/cask/cask/master/go | python

# Make sure cask is in your path
#
# Since it was in my updated config files,
# I just needed to open a new terminal and then:
cd .emacs.d/
cask install