Open main menu

Wikibooks β

Emacs/The Emacs Lisp Package Archive

< Emacs

The Emacs Lisp Package Archive, ELPA, makes it easy to download and install packages for emacs. The official site of ELPA is at

Getting started with ELPAEdit

Installing the package managerEdit

In Emacs 22 and above, the necessary modules are already present to install the package manager from a small bootstrap script. Simply copy and paste the following code in to a *scratch* buffer and execute it with Ctrl-J.

(let ((buffer (url-retrieve-synchronously
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))

The package manager should install itself.

If you are using Emacs 21, you will need to have the wget utility available. Execute the following code:

(let ((buffer (get-buffer-create (generate-new-buffer-name " *Download*"))))
      (set-buffer buffer)
      (shell-command "wget -q -O-"
      (eval-region (point-min) (point-max))
      (kill-buffer (current-buffer))))