Emacs 24 and the package manager
Posted: - Modified: | emacsUpdate: Added (require ‘package) – thanks, Ryan!
By default, the Emacs 24 package manager (M-x package-list-packages
) points to a small repository of Emacs packages. Want more? Phil Hagelberg added support for multiple repositories to package.el. There’s the original ELPA at http://tromey.com/elpa, and there’s a community package source called Marmalade that anyone can upload packages to. Add this to your ~/.emacs
and evaluate it:
(require 'package) ;; Add the original Emacs Lisp Package Archive (add-to-list 'package-archives '("elpa" . "http://tromey.com/elpa/")) ;; Add the user-contributed repository (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
You should then be able to call M-x package-list-packages
to browse and install Emacs packages.
If you don’t have Emacs 24 yet (and you might want to wait for the official release if you use things like BBDB), Phil suggests downloading package.el from the Emacs development tree. This version includes support for multiple repositories.
For even more Emacs goodness outside the package system, check out the Emacs mirror, which lists more than 2,900 packages available through Git.
Thanks to:
12 comments
Victor
2011-01-17T00:09:57ZWow! That sounds great. Installing packages was not a big problem before and now it looks like a trivial thing to do!
Thanks for a nice overview!
Sarah
2011-02-13T16:02:25ZDid you have a go at el-get yet? It interfaces with the ELPA and complements package.el very nicely. It's just much more usable at this moment, at least until the marmalade repo gets filled more. I doubt the ELPA one will be done in just a couple of years. :P
Sacha Chua
2011-02-15T06:38:05ZI have to confess I still tend to download and install packages myself. I should check those options out, though - that will make staying up to date so much easier!
Brooklyn
2011-10-27T10:45:14ZHow does the package manager (package.el )load those downloaded packages?
Brooklyn
2011-10-27T11:36:23ZThis 'package-load-list doesn't work...
I download and install some packages but the emacs does not load then automatically.
Brooklyn
2011-10-27T13:52:34ZOh, I got it. I read the document in the source code, and now it works.
BTW, thanks for your post.
Emacs User
2011-12-30T14:19:20ZYou can't just grab code from Emacs development because it usually works only with the development version.
In this case package.el depends on new Emacs 24.x glyph features and cannot be used.
Unfortunately even ELPA alternative http://marmalade-repo.org/ doesn't mention this in its web page. More confusion is added by the marmalade admin to indicate that one may have an older version of epckage.el . The site should say instead that marmalade is open only for Emacs 24.
There is no updated package.el for Emacs (< 24). At least I haven't see it anywhere.
Jason
2012-06-02T17:38:13ZJust a quick note on el-get and package.el
With the latest Emacs24.1rc package.el is working fine, and so is el-get.
el-get has around 2050 packages as of now, and while elpa/marmalade combined has 464.
Sacha Chua
2012-06-02T17:59:36ZOooh, neato! I should start from a clean Emacs configuration and see what kinds of goodies people have these days...
Jason
2012-06-02T21:15:30ZBy "Working fine" I mean the mechanism is running without falling over, I do find that libraries often need to be installed manually anyway.
The best thing about these package managers is the geek-search-engine facility they provide, wading through EmacsWiki is not really a frictionless experience, so having these packages listed like this is nice.
For example, I loaded several color-themes using el-get, some worked, some needed specific M-x load-library / (require 'lib) ... so they get transplanted into my dropins folder (loop through; load a folder of el/elc files automatically)
There is still a lot of work to be done, oh and heads up, (require 'cl) seems to be needed for many things with Emacs 24.1rc (I'm using the emacsforosx build)
Ryan
2012-12-17T21:03:00ZIm on emacs 24 and I had to put (require 'package) above the given config snippet. If anybody gets Symbol's value as variable is void: package-archives try putting that in your config as well.
Sacha Chua
2012-12-17T21:39:02ZRyan: Good point! Updated.