Installing ELPA Package System for Emacs 23
This page is a guide on installing ELPA package system
package.el for emacs 23.
If you are using emacs 24, see: Emacs: How to Install Packages Using ELPA, MELPA. (type 【Alt+x】
version or in terminal
To install, paste the following in a empty file:
(let ((buffer (url-retrieve-synchronously "http://tromey.com/elpa/package-install.el"))) (save-excursion (set-buffer buffer) (goto-char (point-min)) (re-search-forward "^$" nil 'move) (eval-region (point) (point-max)) (kill-buffer (current-buffer))))
That will download the file and place it at
(very neat elisp trick! note to self:
url-retrieve-synchronously is bundled with emacs 23. Use it like wget/curl!)
Also, it automatically adds the following in your
.emacs file, so that it'll be loaded everytime you start emacs.
(when (load (expand-file-name "~/.emacs.d/elpa/package.el")) (package-initialize))
How to Upgrade ELPA from Emacs 23 to Emacs 24
If you have installed ELPA with emacs 23 and now just upgraded to emacs 24, here's what to do.
- In your emacs init file, delete any code block containing
- Quit emacs.
- Delete the directory
- Start emacs.
list-packagesto re-install packages you want.
(package-initialize). And move all config of your installed packages after this.
For how to use the package system, see: Emacs: How to Install Packages Using ELPA, MELPA.
Patreon me $5. Ask me question on patreon