-
Notifications
You must be signed in to change notification settings - Fork 304
/
init.el
29 lines (26 loc) · 1.03 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;; init.el --- Where all the magic begins
;;
;; Part of the Emacs Starter Kit
;;
;; This is the first thing to get loaded.
;;
;; load Org-mode from source when the ORG_HOME environment variable is set
(when (getenv "ORG_HOME")
(let ((org-lisp-dir (expand-file-name "lisp" (getenv "ORG_HOME"))))
(when (file-directory-p org-lisp-dir)
(add-to-list 'load-path org-lisp-dir)
(require 'org))))
;; load the starter kit from the `after-init-hook' so all packages are loaded
(add-hook 'after-init-hook
`(lambda ()
;; remember this directory
(setq starter-kit-dir
,(file-name-directory (or load-file-name (buffer-file-name))))
;; only load org-mode later if we didn't load it just now
,(unless (and (getenv "ORG_HOME")
(file-directory-p (expand-file-name "lisp"
(getenv "ORG_HOME"))))
'(require 'org))
;; load up the starter kit
(org-babel-load-file (expand-file-name "starter-kit.org" starter-kit-dir))))
;;; init.el ends here