Ages ago we discussed ELPA, the emacs packaging system. It allows you to
browse through an online repository of emacs packages and install, uninstall
and upgrade them, all from within the emacs comfort zone (menu:
Options/Manage Emacs Packages
).
Emacs 24.1 (a pretest is available) will include a version of ELPA --
package.el
; the version included with emacs 24 supports multiple
archives. The official archive is the one provided by GNU, then there is
the current one for ELPA, but there's now a third one available: Marmalade.
Marmelade ('Spreadable Elisp') offers a very easy way for developers to
make their packages available to emacs users, and an even easier way for
users to test out interesting packages.
To use all available package repositories (GNU, ELPA and Marmalade), add
the following snippet to your .emacs
:
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") ("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/")))
This works out-of-the-box for Emacs 24; for Emacs 23, you'll need the newer
package.el
, which you can get from the emacs 24 repo (if necessary, remove
the old package.el
first).
Currently, there are 870 packages listed in the three repositories – a lot of
toys to play with! In fact, it is already getting quite hard to find what
you're looking for; a bit more structured way (maybe using categories) would
be useful. Also, a bit more information than the one-line description would
be very useful.
Nevertheless, it's a great addition to emacs, which will make it much easier
to play with packages – without even having to read the installation
instructions.
18 comments:
Have you checked out el-get https://github.com/dimitri/el-get ?
How do you evaluate that?
@davidbe: haven't tested that one -- it seems el-get can use package.el as a backend, as well as get packages from other places, such as git repos etc.
did you test it?
I've been using el-get for some months now, and it is really really great. Quite easy to setup, and works very well with a great diversity of sources.
I've written a small introduction to it, but in french :
http://blog.nozav.org/post/2011/09/20/el-get%2C-un-gestionnaire-de-script/package/extension-pour-Emacs
el-get is excellent. It even supports the Emacs Wiki as a package repository. I'd definitely recommend using it.
@djcb I have been using it. It is like an abstraction layer over package.el, git/bzr/...-sources, plaintext (e.g. Emacs Wiki) source, ...
I'm interested to hear how you evaluate it (and write a good post about it)! :-)
I loved having packages in XEmacs (since 1999?) and am looking forward to having them in GNU Emacs. Thanks for the pointer to additional repositories!
i think the emacs24 repo link for package.el should be http://repo.or.cz/w/emacs.git/blob_plain/HEAD:/lisp/emacs-lisp/package.el
@Anonymous: thanks, fixed.
Is there a place online to browse emacs packages, say from a computer that has a browser but no emacs, or where package.el hasn't been installed?
Anonymous: you can get lots and lots of packages from the EmacsWiki — even more than you can with package.el. As you browse http://www.emacswiki.org/ you'll find Download links next to lots of the packages described there.
Thanks for a good tip. I also other posts on your blog.
Quick Question:
On emacs24 with all three repo in .emacs as per your post, marking a package with "I" works only for those in ELPA (to be precise first 472 as of 11/27/2011). How to select from the rest? Also, how to remove mark from a package that was selected by mistake?
Thanks
Update:
Ok, on remove mark, I tried with "U" and it worked.
How does upgrading of the packages work? I couldn't find anything in the docs.
@Anonymous: the package will marked as 'upgradeable' when an upgrade is available. Doesn't happen too often (yet) though.
other @Anonymous: you cannot affect the 'built-in' packages (that's the part beyond the 472). They are installed as part of emacs.
Do any of these repositories have Wanderlust in them? I've wanted to try it forever and the necessity of hunting down the latest unofficial versions of everything keeps intimidating me.
I tried using the package.el from the emacs 24 repo with emacs 23.1.1, it complained about tabulated-list, I downloaded tabulated-list.el and tried a byte-compile but I get this error:
Debugger entered--Lisp error: (void-variable glyphless-char-display)
has anyone managed to get it to work on emacs 23?
Thx
Anonymous: I had the same problem, but then I followed the link from another Anonymous post, and grabbed http://repo.or.cz/w/emacs.git/blob_plain/1a0a666f941c99882093d7bd08ced15033bc3f0c:/lisp/emacs-lisp/package.el
That mostly worked for me in Emacs 23.3.1. I can install and use packages, but I can't uninstall them. (Until Emacs 24, I'm leaving those packages installed but just not loading them from my .emacs)
Here's what my .emacs looks like:
(require 'package)
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")))
(package-initialize)
I should point out that there is now also Melpa, an ELPA package repository which shares many of the benefits of el-get, while being considerably more convenient to use. We build snapshot ELPA packages directly from upstream source code control and the emacswiki, so in contrast to using el-get, Melpa users don't need to have bzr, hg etc installed.
Post a Comment