Permalink
Browse files

Now use Carton for emacs for dependency management

  • Loading branch information...
oakho committed Mar 10, 2013
1 parent 4354c0b commit 968f8849eb106cdbf42f367e9919c800c48da74b
Showing with 2,691 additions and 73 deletions.
  1. +3 −2 emacs/emacs.d.symlink/.gitignore
  2. +49 −0 emacs/emacs.d.symlink/Carton
  3. +9 −45 emacs/emacs.d.symlink/init.el
  4. +17 −5 emacs/emacs.d.symlink/oakho/init.el
  5. +4 −1 emacs/emacs.d.symlink/oakho/oakho-keybindings.el
  6. +3 −14 emacs/emacs.d.symlink/oakho/oakho-variables.el
  7. +106 −1 emacs/emacs.d.symlink/prelude/core/prelude-packages.el
  8. +0 −3 emacs/emacs.d.symlink/prelude/core/prelude-ui.el
  9. +1 −1 emacs/emacs.d.symlink/prelude/init.el
  10. +676 −0 emacs/emacs.d.symlink/prelude/vendor/COPYING
  11. +31 −0 emacs/emacs.d.symlink/prelude/vendor/README.extras
  12. +91 −0 emacs/emacs.d.symlink/prelude/vendor/ac-slime.el
  13. +38 −0 emacs/emacs.d.symlink/prelude/vendor/auto-complete-yasnippet.el
  14. +269 −0 emacs/emacs.d.symlink/prelude/vendor/erc-bbdb.el
  15. +181 −0 emacs/emacs.d.symlink/prelude/vendor/erc-chess.el
  16. +149 −0 emacs/emacs.d.symlink/prelude/vendor/erc-highlight-nicknames.el
  17. +416 −0 emacs/emacs.d.symlink/prelude/vendor/erc-list-old.el
  18. +416 −0 emacs/emacs.d.symlink/prelude/vendor/erc-nicklist.el
  19. +230 −0 emacs/emacs.d.symlink/prelude/vendor/erc-speak.el
  20. BIN emacs/emacs.d.symlink/prelude/vendor/images/icq-offline.png
  21. BIN emacs/emacs.d.symlink/prelude/vendor/images/icq-online.png
  22. BIN emacs/emacs.d.symlink/prelude/vendor/images/irc-offline.png
  23. BIN emacs/emacs.d.symlink/prelude/vendor/images/irc-online.png
  24. BIN emacs/emacs.d.symlink/prelude/vendor/images/msn-offline.png
  25. BIN emacs/emacs.d.symlink/prelude/vendor/images/msn-online.png
  26. +2 −1 zsh/zshrc.symlink
@@ -1,3 +1,4 @@
-el-get/*
+elpa/*
auto-save-list/*
-ac-comphist.dat
+ac-comphist.dat
+projectile-bookmarks.eld
@@ -0,0 +1,49 @@
+(source "melpa" "http://melpa.milkbox.net/packages/")
+(source "marmalade" "http://marmalade-repo.org/packages/")
+(source "tromey" "http://tromey.com/elpa")
+
+(depends-on "s" "1.3.0")
+(depends-on "dash" "1.0.3")
+(depends-on "powerline")
+(depends-on "rinari")
+(depends-on "auto-complete")
+(depends-on "auto-complete-clang")
+(depends-on "ac-slime")
+(depends-on "expand-region")
+(depends-on "popwin")
+(depends-on "drag-stuff")
+(depends-on "fuzzy")
+(depends-on "highlight-indentation")
+(depends-on "js2-mode")
+(depends-on "nrepl")
+(depends-on "popup")
+(depends-on "powerline")
+(depends-on "pretty-mode")
+(depends-on "rspec-mode")
+(depends-on "smart-tab")
+(depends-on "ace-jump-mode")
+(depends-on "textmate")
+(depends-on "ecukes")
+(depends-on "iedit")
+(depends-on "rainbow-mode")
+(depends-on "ack-and-a-half")
+(depends-on "elisp-slime-nav")
+(depends-on "exec-path-from-shell")
+(depends-on "expand-region")
+(depends-on "flycheck")
+(depends-on "gist")
+(depends-on "guru-mode")
+(depends-on "helm")
+(depends-on "helm-projectile")
+(depends-on "magit")
+(depends-on "magithub")
+(depends-on "melpa")
+(depends-on "volatile-highlights")
+(depends-on "yasnippet")
+(depends-on "git-commit-mode")
+(depends-on "gitconfig-mode")
+(depends-on "gitignore-mode")
+(depends-on "flymake-ruby")
+(depends-on "redo+")
+(depends-on "undo-tree")
+(depends-on "slime")
@@ -2,53 +2,17 @@
(let ((default-directory "~/.emacs.d"))
(normal-top-level-add-subdirs-to-load-path))
+;; Turn off early to avoid momentary display.
+(mapc
+ (lambda (mode)
+ (if (fboundp mode)
+ (funcall mode -1)))
+ '(menu-bar-mode tool-bar-mode scroll-bar-mode))
+
(setq-default ispell-dictionary "american"
flyspell-issue-message-flag nil)
-;; El-get
-(setq el-get-sources '((:name powerline)
- (:name rinari)
- (:name auto-complete)
- (:name auto-complete-clang)
- (:name auto-complete-yasnippet)
- (:name ac-slime)
- (:name erc-extras)
- (:name erc-highlight-nicknames)
- (:name apel)
- (:name fuzzy)
- (:name highlight-indentation)
- (:name js2-mode)
- (:name markdown-mode)
- (:name nrepl)
- (:name popup)
- (:name powerline)
- (:name pretty-mode)
- (:name rspec-mode)
- (:name smart-tab)
- (:name ace-jump-mode)
- (:name key-chord)
- (:name textmate)))
-
-(defun sync-packages ()
- "Synchronize packages"
- (interactive)
- (el-get 'sync '(el-get package))
- (add-to-list 'package-archives '("tromey" . "http://tromey.com/elpa/"))
- (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
- (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
- (setq my-packages (mapcar 'el-get-source-name el-get-sources))
- (el-get 'sync my-packages))
-
-(if (require 'el-get nil t)
- (sync-packages)
- (url-retrieve
- "https://raw.github.com/dimitri/el-get/master/el-get-install.el"
- (lambda (s)
- (let (el-get-master-branch)
- (end-of-buffer)
- (eval-print-last-sexp)
- (setq el-get-verbose t)
- (sync-packages)))))
+(package-initialize)
-(load-file "~/.emacs.d/prelude/init.el")
(load-file "~/.emacs.d/oakho/init.el")
+(load-file "~/.emacs.d/prelude/init.el")
@@ -12,9 +12,6 @@
(require 'oakho-ruby)
(require 'oakho-erc)
-;; Packages
-(prelude-ensure-module-deps '(redo+ magit magithub rainbow-mode volatile-highlights))
-
(add-to-list 'custom-theme-load-path "~/.emacs.d/prelude/themes")
(load-theme 'tangotango t)
@@ -44,8 +41,9 @@
;; Powerline
(when (require 'powerline nil t)
- (setq powerline-color1 "grey10")
- (setq powerline-color2 "grey40"))
+ (powerline-default-center)
+ (setq powerline-color1 "grey40")
+ (setq powerline-color2 "grey10"))
;; Ido customization
(when (require 'ido-hacks nil t)
@@ -79,6 +77,9 @@
(autoload 'js2-mode "js2-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
+;; Drag Stuff
+(require 'drag-stuff)
+
;; Redo+
(require 'redo+)
@@ -119,3 +120,14 @@
;; Delete Selection Mode
(delete-selection-mode)
+
+;; Textmate
+(require 'textmate)
+(textmate-mode)
+
+;; Linum
+(require 'linum)
+(linum-mode nil)
+
+;; Disable Flyspell
+(setq prelude-flyspell nil)
@@ -51,6 +51,9 @@
(define-key oakho-minor-mode-map (kbd "M-n") "~")
(define-key oakho-minor-mode-map (kbd "M-/") "\\")
+(define-key oakho-minor-mode-map (kbd "M-N") 'drag-stuff-down)
+(define-key oakho-minor-mode-map (kbd "M-P") 'drag-stuff-up)
+
;; Redo+
(define-key oakho-minor-mode-map (kbd "s-z") 'undo)
(define-key oakho-minor-mode-map (kbd "s-Z") 'redo)
@@ -79,7 +82,7 @@
(define-key oakho-minor-mode-map (kbd "C-c m b") 'magit-checkout)
;; Ace Jump Mode
-(key-chord-define oakho-minor-mode-map "fj" 'ace-jump-mode)
+(define-key oakho-minor-mode-map (kbd "C-c j") 'ace-jump-mode)
(add-hook 'prelude-prog-mode-hook 'oakho-minor-mode t)
(add-hook 'prelude-prog-mode-hook 'oakho-keybindings-hook t)
@@ -5,17 +5,6 @@
;; Emacs
(setq shell-command-switch "-ic")
-;; Desktop
-(setq desktop-dirname prelude-savefile-dir
- desktop-base-file-name "emacs.desktop"
- desktop-base-lock-name "lock"
- desktop-path (list desktop-dirname)
- desktop-save t
- desktop-files-not-to-save "^$" ;reload tramp paths
- desktop-load-locked-desktop nil)
-
-;; (desktop-save-mode t)
-
;; Always use spaces insted of tabs
(setq-default indent-tabs-mode nil)
@@ -53,7 +42,7 @@
(setq scroll-conservatively 100000)
(setq auto-window-vscroll nil)
(setq auto-save-interval 5000)
-(setq bidi-paragraph-direction nil)
+(setq bidi-paragraph-direction nil)
;; Let's create music instead of the annoying bleep sound
(setq ring-bell-function 'oakho-bells)
@@ -95,7 +84,7 @@
(setq js2-bounce-indent-p t)
;; Vertical window split
-(setq split-height-threshold 1)
-(setq split-width-threshold nil)
+;; (setq split-height-threshold 1)
+;; (setq split-width-threshold nil)
(provide 'oakho-variables)
@@ -36,7 +36,7 @@
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; set package-user-dir to be relative to Prelude install path
-(setq package-user-dir (expand-file-name "elpa" prelude-dir))
+;; (setq package-user-dir (expand-file-name "elpa" prelude-dir))
(package-initialize)
;; required because of a package.el bug
@@ -110,5 +110,110 @@
(defun prelude-ensure-module-deps (packages)
(-each (-remove #'package-installed-p packages) #'package-install))
+(provide 'prelude-packages)
+;;; prelude-packages.el ends here;;; prelude-packages.el --- Emacs Prelude: default package selection.
+;;
+;; Copyright © 2011-2013 Bozhidar Batsov
+;;
+;; Author: Bozhidar Batsov <bozhidar@batsov.com>
+;; URL: http://batsov.com/emacs-prelude
+;; Version: 1.0.0
+;; Keywords: convenience
+
+;; This file is not part of GNU Emacs.
+
+;;; Commentary:
+
+;; Takes care of the automatic installation of all the packages required by
+;; Emacs Prelude.
+
+;;; License:
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 3
+;; of the License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa" . "http://melpa.milkbox.net/packages/") t)
+(package-initialize)
+
+(defvar prelude-packages
+ '()
+ "A list of packages to ensure are installed at launch.")
+
+(defun prelude-packages-installed-p ()
+ (-all? #'package-installed-p prelude-packages))
+
+(defun prelude-install-packages ()
+ (unless (prelude-packages-installed-p)
+ ;; check for new packages (package versions)
+ (message "%s" "Emacs Prelude is now refreshing its package database...")
+ (package-refresh-contents)
+ (message "%s" " done.")
+ ;; install the missing packages
+ (-each
+ (-reject #'package-installed-p prelude-packages)
+ #'package-install)))
+
+(prelude-install-packages)
+
+(defmacro prelude-auto-install (extension package mode)
+ `(add-to-list 'auto-mode-alist
+ `(,extension . (lambda ()
+ (unless (package-installed-p ',package)
+ (package-install ',package))
+ (,mode)))))
+
+(defvar prelude-auto-install-alist
+ '(("\\.clj\\'" clojure-mode clojure-mode)
+ ("\\.coffee\\'" coffee-mode coffee-mode)
+ ("\\.css\\'" css-mode css-mode)
+ ("\\.erl\\'" erlang erlang-mode)
+ ("\\.feature\\'" feature-mode feature-mode)
+ ("\\.groovy\\'" groovy-mode groovy-mode)
+ ("\\.haml\\'" haml-mode haml-mode)
+ ("\\.hs\\'" haskell-mode haskell-mode)
+ ("\\.latex\\'" auctex LaTeX-mode)
+ ("\\.less\\'" less-css-mode less-css-mode)
+ ("\\.lua\\'" lua-mode lua-mode)
+ ("\\.markdown\\'" markdown-mode markdown-mode)
+ ("\\.md\\'" markdown-mode markdown-mode)
+ ("\\.php\\'" php-mode php-mode)
+ ("\\.sass\\'" sass-mode sass-mode)
+ ("\\.scala\\'" scala-mode2 scala-mode)
+ ("\\.scss\\'" scss-mode scss-mode)
+ ("\\.slim\\'" slim-mode slim-mode)
+ ("\\.yml\\'" yaml-mode yaml-mode)))
+
+;; markdown-mode doesn't have autoloads for the auto-mode-alist
+;; so we add them manually if it's already installed
+(when (package-installed-p 'markdown-mode)
+ (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
+ (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)))
+
+(-each prelude-auto-install-alist
+ (lambda (entry)
+ (let ((extension (car entry))
+ (package (cadr entry))
+ (mode (cadr (cdr entry))))
+ (unless (package-installed-p package)
+ (prelude-auto-install extension package mode)))))
+
+(defun prelude-ensure-module-deps (packages)
+ (-each (-remove #'package-installed-p packages) #'package-install))
+
(provide 'prelude-packages)
;;; prelude-packages.el ends here
@@ -94,8 +94,5 @@
(abbreviate-file-name (buffer-file-name))
"%b"))))
-;; use zenburn as the default theme
-(load-theme 'zenburn t)
-
(provide 'prelude-ui)
;;; prelude-ui.el ends here
@@ -97,7 +97,7 @@ Emacs load path."
(require 'prelude-css)
(require 'prelude-emacs-lisp)
(require 'prelude-erc)
-(require 'prelude-erlang)
+;; (require 'prelude-erlang)
(require 'prelude-haskell)
(require 'prelude-js)
(require 'prelude-latex)
Oops, something went wrong.

0 comments on commit 968f884

Please sign in to comment.