Emacs package system lets you auto-update and manage emacs packages. It lets you easily see packages available, update to latest version, install/remove packages. So you don't have to manually track what's installed, each package's home page, whether there's new version, etc. It is bundled with emacs 24. 〔☛ New Features in Emacs 24〕
list-packages. It'll list available packages, like this:
This list is shown in
package-menu-mode. In this mode, here's the most useful keys:
(For complete list of keys, call
describe-mode 【Ctrl+h m】)
So, for example, i want to install the
clojure-mode. I type i to mark it, x to run install. Then, i got the following files in my dir, all automatically byte-compiled and loaded.
~/.emacs.d/elpa/clojure-mode-1.7.1: clojure-mode-autoloads.el clojure-mode-pkg.el clojure-mode-pkg.elc clojure-mode.el clojure-mode.elc
and now i can call
clojure-mode, and it works right there! (no need to restart, but for some packages, you may need to turn it on.)
New packages are installed at 〔~/.emacs.d/elpa/〕.
The source of the packages are from package servers. There are several.
To add it, put the following in your emacs init file:
(when (>= emacs-major-version 24) (require 'package) (package-initialize) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) )
Note: the emacs package system, called ELPA (aka package.el), is started by Tom Tromey. Marmalade is started by Nathan Weizenbaum. MELPA is started by Donald Ephraim Curtis (aka milkypostman) Thank you guys.
New variable “package-enable-at-startup”. By default, this is
New variable “package-load-list”. This determines which packages should be loaded at start-up.
describe-variable for details.
Emacs package system isn't perfect. For some modes, you still have to read the package header file and put stuff in your emacs init file for the package to work properly. For detail, see: Emacs 24 Package System Problems.
For a basic understanding of how to install emacs packages manually without package system, see: How to Install Emacs Packages.
There are other emacs package systems. example