Created
January 23, 2010 13:04
-
-
Save gregnewman/284598 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; init.el --- Where all the magic begins | |
;; | |
;; This file loads both | |
;; - Org-mode : http://orgmode.org/ and | |
;; - Org-babel: http://orgmode.org/worg/org-contrib/babel/org-babel.php#library-of-babel | |
;; | |
;; It then loads the rest of our Emacs initialization from Emacs lisp | |
;; embedded in literate Org-mode files. | |
;; Load up Org Mode and Org Babel for elisp embedded in Org Mode files | |
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name))) | |
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp") | |
(add-to-list 'load-path dotfiles-dir) | |
(add-to-list 'load-path (concat dotfiles-dir "/src")) | |
(progn (cd "~/.emacs.d/src") | |
(normal-top-level-add-subdirs-to-load-path)) | |
(let* ((org-dir (expand-file-name | |
"lisp" (expand-file-name | |
"org" (expand-file-name | |
"src" dotfiles-dir)))) | |
(org-contrib-dir (expand-file-name | |
"lisp" (expand-file-name | |
"contrib" (expand-file-name | |
".." org-dir)))) | |
(load-path (append (list org-dir org-contrib-dir) | |
(or load-path nil)))) | |
;; load up Org-mode and Org-babel | |
(require 'org-install) | |
(require 'org-babel-init)) | |
;; load up all literate org-mode files in this directory | |
(mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$")) | |
;;; init.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment