Cask is a project management tool which can be also used to easily manage your local emacs configuration.
Installing cask is easy. You can either run the following command on the command-line:
curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python
Or if you are on a mac, you can install it using homebrew
:
brew install cask
Once installed, you create a Cask
file. Cask files list all package dependencies which should be included in your configuration. You can create a new Cask file at the root of your ~/.emacs
directory.
You will also need to initialize Cask in your ~/.emacs.d/init.el
. If you installed using homebrew, add these lines:
(require 'cask "/usr/local/share/emacs/site-lisp/cask/cask.el")
(cask-initialize)
Or you can supply the path to cask, if you used the install script:
(require 'cask "~/.cask/cask.el")
(cask-initialize)
A simple Cask file looks like this:
(source gnu)
(source melpa)
(depends-on "projectile")
(depends-on "flx")
(depends-on "flx-ido")
Here we are specifying source repositories to look for packages in. Then we are specifying that we want the projectile
, flx
, and flx-ido
packages installed.
Once you have a Cask file, you can install all the dependencies with the follwoing command on the command-line:
cask install