Skip to content

Instantly share code, notes, and snippets.

@marchdown
Created May 26, 2011 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marchdown/994368 to your computer and use it in GitHub Desktop.
Save marchdown/994368 to your computer and use it in GitHub Desktop.
Automatically install missing packages with package.el
;; ~/.emacs.d/package.el from http://repo.or.cz/w/emacs.git/blob_plain/1a0a666f941c99882093d7bd08ced15033bc3f0c:/lisp/emacs-lisp/package.el
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")))
(package-initialize))
(setq mypackages '(clojure-mode slime slime-repl magit auctex))
;; Make sure that all packages from mypackages are installed
(dolist (p mypackages)
(when (not (assoc p package-alist))
(package-install p)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment