Skip to content

Instantly share code, notes, and snippets.

@mpcjanssen
Created October 25, 2014 14:33
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 mpcjanssen/c504d3d9fda9ad341fde to your computer and use it in GitHub Desktop.
Save mpcjanssen/c504d3d9fda9ad341fde to your computer and use it in GitHub Desktop.
Autoload packages
;; list the packages you want
(setq package-list '(org
pkg-info
dash
molokai-theme
solarized-theme
htmlize
helm
helm-ls-git
helm-ls-hg
find-file-in-repository
smex
w3m
notmuch))
;; list the repositories containing them
(setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))
;; activate all the packages (in particular autoloads)
(package-initialize)
;; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
;; install the missing packages
(dolist (package package-list)
(unless (package-installed-p package)
(package-install package)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment