]> git.rkrishnan.org Git - .emacs.d.git/commitdiff
add Makefile to manage packages
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 9 Dec 2015 09:21:59 +0000 (14:51 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 9 Dec 2015 09:23:02 +0000 (14:53 +0530)
Makefile [new file with mode: 0644]
init.el
packages.el [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 1012e2c0db18c0b1c4af06999210ccdb773fe9dd..a054cfb36a0db0867400ceeb21df176afdbb31a9 100644 (file)
--- a/init.el
+++ b/init.el
     (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 (file)
index 0000000..0ca2637
--- /dev/null
@@ -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))