From 8915264672b221fa280c6f42eb83dafd43b799c4 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Sat, 26 Sep 2015 23:07:35 -0500 Subject: [PATCH] Working on more emacs configuration Added magit and projectile to the default packages. Magit for nicely working with git repositories while inside emacs. Projectile for working on project directories while within emacs. Also added some comments and basic configuration changes to the init file. Finally added a fix mentioned on the melpa site to resolve an emacs 24 issue related to resolving package dependencies. --- home/.emacs.d/init.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/home/.emacs.d/init.el b/home/.emacs.d/init.el index 08782d4..36bf428 100644 --- a/home/.emacs.d/init.el +++ b/home/.emacs.d/init.el @@ -11,7 +11,9 @@ (defvar sothr/packages '(auto-complete cyberpunk-theme gist + magit markdown-mode + projectile yaml-mode) "Default packages") @@ -21,12 +23,20 @@ (setq package-archive-enable-alist '(("melpa" deft magit))) +;; Advice from the melpa site for a package dependency validation error in emacs 24 +;;(defadvice package-compute-transaction +;; (before package-compute-transaction-reverse (package-list requirements) activate compile) +;; "reverse the requirements" +;; (setq requirements (reverse requirements)) +;; (print requirements)) + ;; Make sure default packages are installed (defun sothr/packages-installed-p () (loop for pkg in sothr/packages when (not (package-installed-p pkg)) do (return nil) finally (return t))) +;; This is the logic that runs the above function (unless (sothr/packages-installed-p) (message "%s" "Refreshing package database...") (package-refresh-contents) @@ -34,4 +44,8 @@ (when (not (package-installed-p pkg)) (package-install pkg)))) +;; Default configuration for auto-complete +(ac-config-default) + +;; Load my default theme (load-theme 'cyberpunk t)