I recently learned something useful from Timo Geusch in a post on pinning a package to a specific archive. It turns out that Emacs 24.4 has a new variable, package-pinned-packages
, that tells the package system to get certain packages from a certain archive and no others. The variable is a list of cons cells of the form (PACKAGE . ARCHIVE). For example, if you want to get the package htmlize
from marmalade only, you would add the cons
(htmlize . "marmalade")
to the package-pinned-packages
list.
Probably the most important use of this is to specify that some packages be loaded only from melpa-stable. For example, if you want to ensure that you get the stable versions of smex
, yasnippet
, and typo
you would add
(setq package-pinned-packages '((smex . "melpa-stable") (yasnippet . "melpa-stable") (typo . "melpa-stable")))
to your .emacs
or init.el
file.
This is really convenient and much easier than the workarounds that were necessary before.