From: Ramakrishnan Muthukrishnan Date: Wed, 9 Dec 2015 09:21:59 +0000 (+0530) Subject: add Makefile to manage packages X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/$rel_link?a=commitdiff_plain;h=8a994a83d358c04922270747ce2c45c545a00273;p=.emacs.d.git add Makefile to manage packages --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..25ef0ab --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +emacs ?= emacs + +upgrade: + $(emacs) -batch -l packages.el + +run: + $(emacs) -Q -l init.el + +up: upgrade run diff --git a/init.el b/init.el index 1012e2c..a054cfb 100644 --- a/init.el +++ b/init.el @@ -36,42 +36,6 @@ (tool-bar-mode 0) (menu-bar-mode 0))) -; my-packages.el -(require 'package) -(add-to-list 'package-archives - '("melpa" . "http://melpa.milkbox.net/packages/") t) -;; (add-to-list 'package-archives -;; '("marmalade" . "http://marmalade-repo.org/packages/") t) -(package-initialize) - -; fetch the list of packages available -(unless package-archive-contents - (package-refresh-contents)) - -;; make sure my list of packages are installed -(setq package-list '(go-mode - rust-mode - haskell-mode - ghc - restclient - tangotango-theme - fill-column-indicator - paredit - leuven-theme - notmuch - railscasts-theme - racket-mode - company - flycheck - flycheck-haskell - magit - ledger-mode)) - -; install the missing packages -(dolist (package package-list) - (unless (package-installed-p package) - (package-install package))) - ;; tangotango ;; (load-theme 'tangotango t) ;; (load-theme 'railscasts t) @@ -84,7 +48,7 @@ (erc-autojoin-mode t) (setq erc-autojoin-channels-alist - '((".*\\.freenode.net" "#tahoe-lafs") + '((".*\\.freenode.net" "#tahoe-lafs" "#snowdrift" "#haskell" "#haskell-beginners") (".*\\.oftc.net" "#LeastAuthority") ;;(".*\\.mozilla.org" "#rust-beginners") )) diff --git a/packages.el b/packages.el new file mode 100644 index 0000000..0ca2637 --- /dev/null +++ b/packages.el @@ -0,0 +1,39 @@ +; my-packages.el +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") t) +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/") t) +(package-initialize) + +; fetch the list of packages available +(unless package-archive-contents + (package-refresh-contents)) + +;; make sure my list of packages are installed +(setq package-list '(go-mode + rust-mode + haskell-mode + ghc + restclient + tangotango-theme + fill-column-indicator + paredit + leuven-theme + notmuch + railscasts-theme + racket-mode + auto-complete + magit + ledger-mode)) + +; install the missing packages +(dolist (package package-list) + (unless (package-installed-p package) + (package-install package))) + +;; upgrade installed +(save-window-excursion + (package-list-packages t) + (package-menu-mark-upgrades) + (package-menu-execute t))