39

This has always confused me, since people are saying that MELPA does have newer versions of packages, but it's not really clear, if GNU ELPA is just a subset of MELPA, or if I do need both?

The reason why I'm asking is that I'm experimenting with my packages a lot, and package-list-packages takes quite a while. I'm aware of package-list-packages-no-fetch, but more often than not I'd like to get the most recent package list.

So the question is, can I just use MELPA and get the same (and possibly newer versions) packages as if I used both MELPA and GNU ELPA?

Drew
  • 75,699
  • 9
  • 109
  • 225
Jakub Arnold
  • 493
  • 1
  • 4
  • 6

2 Answers2

62

First of all, ELPA is the name of a specification, the Emacs Lisp Package Archive. There are three widely known implementations of that specification, GNU ELPA, Marmalade and MELPA.

  • GNU ELPA is the official GNU Emacs archive, enabled out of the box for sufficiently new Emacs installations. It is comparatively small, contributing to it requires copyright assignment and cooperating with the official mailing list. It is the closest thing we have to a vetting comparable to a Linux distribution package archive.

  • MELPA is an unofficial archive with the largest amount of packages. Each package is briefly vetted for code style with its pull request for inclusion, after that packages are automatically built from their (usually VCS) sources. Rebuilds can happen every hour.

    • There is also MELPA stable which builds tagged releases only, but has a lot less packages, less even than Marmalade.
  • Marmalade was another (now dead) unofficial archive with a good amount of versioned packages. Authors and maintainers need to upload their releases manually to it. Vetting is done once for every new member before allowing them to have an user account, after that is done, they are free to release as they wish.

As for the overlap, there is practically no overlap between GNU ELPA and Marmalade, and similarly for GNU ELPA and MELPA. Marmalade and MELPA however overlap a fair amount. I'd estimate that most of Marmalade is a subset of MELPA. That's why you can go with MELPA for most packages and maybe GNU ELPA for a few missing ones.

Update: According to malabarba's package stats MELPA Stable did surpass Marmalade in number of available packages. I'd pick it over Marmalade now.

Update: Marmalade is essentially dead. The certificate has expired and there's hardly any new packages uploaded. This is due to its rather unusual process, you need to be manually added to the users by its owner and as he's gone missing, no new users have been added since 2016 or so.

wasamasa
  • 21,803
  • 1
  • 65
  • 97
-5

No, you might don't need GNU ELPA or any ELPA.

The practical reason not to use GNU ELPA or any third party repository is to protect my Emacs from ELPA shut down. Shutdown did happen from time to time (see https://www.reddit.com/r/emacs/search/?q=elpa%20down&restrict_sr=1)

Most of my packages are downloaded from https//melpa.org , I could avoid GNU ELPA by creating a small local package mirror of selected GNU ELPA packages.

Check my setup at https://github.com/redguardtoo/emacs.d/blob/master/lisp/init-elpa.el, GNU ELPA is not used.

If I have to use some GNU ELPA only packages, I'd rather create my own local ELPA instead (it's as simple as create a text file archive-contents), Check my ~/.emacs.d/localelpa.

For example, seq-2.20.tar only exist at GNU ELPA and I need this it. So I add this package into my local elpa at https://github.com/redguardtoo/emacs.d/tree/master/localelpa

Currently I only use four packages from GNU ELPA,

gnu-elpa-keyring-update-2019.3.tar
let-alist-1.0.5.el
seq-2.20.tar
undo-tree-20170706.246.tar

These packages are placed in my localelpa so I don't need access GNU ELPA.

You can also check my package https://github.com/redguardtoo/elpa-mirror which creates a local repository from installed packages. So even remote repository (GNU ELPA, MELPA) is optional now.

You can also use source instead downloaded package. Please check https://github.com/redguardtoo/emacs.d/tree/master/site-lisp. rainbow-mode, You need understand what's load-path (http://emacswiki.org/emacs/LoadPath) if you use source.

You can also advice package--add-to-archive-contents to tweak packages before they are displayed in package manager. This is kind of undocumented hack. It works from Emacs 23.4 to Emacs 27. See init-elpa.el for example.

chen bin
  • 4,781
  • 18
  • 36
  • 7
    You also need GNU ELPA for packages like Auctex, seq.el, let-alist, rainbow-mode, etc. so I'd hardly argue that it's obsolete, rather that its importance is rising as more people enter Emacs development and wish for their packages to be easily available for all. – wasamasa Apr 10 '15 at 14:57
  • I updated my answer a little bit on this issue. – chen bin Apr 14 '15 at 14:07
  • @wasamasa can you please explain, why exactly I'd need gnu elpa for packages such as auctex? – toogley Aug 09 '16 at 20:32
  • 1
    @toogley Because it is only available on GNU ELPA, that's why. – wasamasa Aug 09 '16 at 21:35