Cask for Emacs is what Bundler is to Ruby. It aims to make ELPA dependency management in Emacs painless (as painless as it can be). This includes both your local Emacs installation and Emacs package development.
Migration from Carton
This project was previously named Carton, but because of a name clash with another project, this project was renamed to Cask. A few things needs to be done to migrate:
- Use the
caskcommand instead of the
If your Emacs configuration dependes on
carton, depend on
Rename the file
- Rename the installation directory (default
~/.cask(don't forget to update the path in you shell config)
(And ohh, don't forget to update your
To automatically install Cask, run this command:
curl -fsSkL https://raw.github.com/rejeep/cask.el/master/go | sh
You can also clone the repository.
$ git clone https://github.com/rejeep/cask.el.git
Don't forget to add Cask's bin to your
$ export PATH="/path/to/code/cask/bin:$PATH"
Create a file called
Cask in your project root and specify
$ cask init [--dev]
--dev if the project is for package development)
To install all dependencies, run:
$ cask [install]
This will create a directory called
.cask, containing all dependencies.
To update package version, run:
$ cask update
To list all dependencies, run:
$ cask list
Add this to your
(require 'cask "~/.cask/cask.el") (cask-initialize)
To automatically keep the
Cask file up to date with what you
install from ELPA, check out https://github.com/rdallasgray/pallet.
To create a
-pkg.el file, run:
$ cask package
To run some Emacs Lisp code with ELPA load paths all set up for you, use:
$ cask exec [COMMAND]
$ cask exec make test
To print info about the current project:
$ cask info
Add an ELPA mirror.
(source ALIAS) (source NAME URL)
(source melpa) (source "melpa" "http://melpa.milkbox.net/packages/")
Define this package (used only for package development).
(package NAME VERSION DESCRIPTION)
(package "ecukes" "0.2.1" "Cucumber for Emacs.")
Add a runtime dependency.
(depends-on NAME VERSION)
(depends-on "magit" "0.8.1")
Define this package and its runtime dependencies from the package headers of a
file (used only for package development). The name of the file is relative to
the directory containing the
Set scope to development dependencies.
(development (depends-on "ecukes" "0.2.1") (depends-on "espuds" "0.1.0"))
Local Emacs installation
(source melpa) (depends-on "magit") (depends-on "drag-stuff") (depends-on "wrap-region")
(source melpa) (package "ecukes" "0.2.1" "Cucumber for Emacs.") (depends-on "ansi") (development (depends-on "el-mock") (depends-on "ert"))
To install ZSH completion add the following to your
I still don't get it, give me some real examples
These are some projects using Cask:
Be sure to!
For each make command below, prefix with:
$ EMACS="/path/to/emacs" make abc
Run the unit tests with:
$ make unit
To run the Ecukes tests, first start the fake ELPA server:
$ make server
Then to run the tests:
$ make ecukes
Run all tests with: