Emacs Packages

I’ve been slowly working on a simple Emacs packaging system. As I work on Emacs more, I find I want to install various packages. But, my history with Emacs shows me that I tend to leave random elisp files in my library long after they are later merged into Emacs itself.

The basics of the package system are the same as any other: a package can depend on other packages, and there is a simple way to download and install a package and its dependencies.

However, in this package system, installation and activation are separated. In particular, it can recover if the package installation is internally inconsistent. It also handles the case where multiple versions of a single package are installed.

Taken together this allows the use case I want: I want to be able to install Emacs, use it for a while; then someday upgrade ERC from the package archive, installing the new ERC into my home directory; and then later, after updating Emacs, my local copy should be deactivated.

Download the alpha release here. This requires the url package, so if you are running Emacs 21, you will need to get that from somewhere.

Once you are set up you can test the existing functionality. Get started right away by installing the fun “bubbles” game (aka “same game) by evaluating (package-install 'bubbles). This will download the game, install it, and activate it. Then M-x bubbles to play.

I haven’t written any UI yet, and the package repository is hand-maintained by me (there’s only 2 things in it, and nothing with dependencies). I’m looking for feedback on the code, features, etc, before committing to anything… once things are in better shape I want to move the archive somewhere more public and start getting packaging bits into the upstream projects.

The ideal situation would have package.el in Emacs itself, set up so that some of the larger Emacs modules are only activated by going through the package management system. I wonder how plausible this is.

There are a few other ideas in the source, and a few more I haven’t written in there. For instance, it would be nice not to require a “something-pkg.el” file for a package that is just a single .el file; that would make it much simpler to upload random emacs.sources posts to the archive.

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>