Emacs packages

I've decided to have a go at building a proper package for Emacs; it's going to be some Orgmode and RT integration stuff that I've hacked together over the last few years. Mostly it's a learning experience, but there's the chance it might be useful for someone else too...

I decided to use Cask to manage dependencies and, more importantly, add tests. There are some things I've tripped over that I want to record.

Start by running "cask init --dev". This gives you a file named "Cask" that's ready for filling in. Here's mine:

(source gnu)
(source melpa)

(package "yogurty" "0.0.1" "Orgmode and RT integration.")

(package-file "yogurty.el")

(development
 (depends-on "f")
 (depends-on "ecukes")
 (depends-on "ert-runner")
 (depends-on "el-mock"))

Most of that is boilerplate, but the "package" and "package-file" stanzas were mine. Then I moved over the functions I had into yogurty.el, and ran "cask install --verbose". This gave me this error:

Packages lacks a file header

I couldn't find much on the Cask website about this, but I eventually tracked it down. First, the Emacs manual describes what's required for a "simple package", and how it has to conform to the Library Headers conventions. Second, there's a package named header2, available from ELPA, that automagically creates the headers you need. The EmacsWiki page shows an example of what you'll get. Fill in the "Version" header, and now you can run "cask install". Hurrah!

[3]: EmacsWiki page