Emacs 24 and the package manager

Update: 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:

2011-01-15 Sat 10:31

4 Pingbacks/Trackbacks

  • http://vityok.livejournal.com Victor

    Wow! 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!

  • Pingback: Tweets that mention Emacs 24 and the package manager | sacha chua :: living an awesome life -- Topsy.com

  • Sarah

    Did 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

    • http://sachachua.com Sacha Chua

      I 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!

  • http://blog.chen-yuan.me Brooklyn

    How does the package manager (package.el )load those downloaded packages?

  • http://blog.chen-yuan.me Brooklyn

    This ‘package-load-list doesn’t work…

    I download and install some packages but the emacs does not load then automatically.

  • http://blog.chen-yuan.me Brooklyn

    Oh, I got it. I read the document in the source code, and now it works.

    BTW, thanks for your post.

  • http://example.com Emacs User

    You 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.

  • http://jasonm23.github.com Jason

    Just 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.

  • http://sachachua.com Sacha Chua

    Oooh, neato! I should start from a clean Emacs configuration and see what kinds of goodies people have these days…

  • http://jasonm23.github.com Jason

    By “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)

  • Pingback: NTEmacs version 24 とパッケージマネージャ | Amrta

  • Pingback: Upgrading to emacs 24.1 from emacs 23.2 on Mac OS X Lion | blog.dicksonlabs.com

  • Ryan

    Im 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.

  • http://sachachua.com Sacha Chua

    Ryan: Good point! Updated.

  • Pingback: GNU Emacs | Lexique Informatique