by Derbasti · 14y ago · 0 comments
So to set up a new machine, I simply copy my .emacs over and start Emacs. Emacs will then fetch and install all my plugins automatically. Quite handy!
(require 'package)
(dolist (source '(("technomancy" . "http://repo.technomancy.us/emacs/)
("elpa" . "http://tromey.com/elpa/)))
(add-to-list 'package-archives source t))
(package-initialize)
(defvar my-packages '(starter-kit zenburn-theme auctex color-theme-solarized csharp-mode ecb_snap find-file-in-project flymake-css flymake-php idle-highlight ido-ubiquitous ipython python-mode magit markdown-mode paredit pastels-on-dark-theme php-mode rainbow-mode smex solarized-theme starter-kit-js zenburn-theme)
"A list of packages to ensure are installed at launch.")
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
Where you add the package name to my-packages. It's kinda cool to see it download and compile everything on a new install.