Skip to content

Instantly share code, notes, and snippets.

@jimmo
Created April 19, 2016 07:00
Show Gist options
  • Save jimmo/6a7f818d36b51ddbae71b47540c62df7 to your computer and use it in GitHub Desktop.
Save jimmo/6a7f818d36b51ddbae71b47540c62df7 to your computer and use it in GitHub Desktop.
Simple package management for Emacs
;; Package manager for ELPA (and add MELPA).
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; Function to install all required packages on a new machine.
(defun jim-install-packages ()
(interactive)
(defvar jim-packages
'(go-mode flymake-go dot-mode whole-line-or-region auto-complete go-autocomplete arduino-mode))
(package-refresh-contents)
(dolist (p jim-packages)
(when (not (package-installed-p p))
(package-install p))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment