-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.el
37 lines (31 loc) · 1.28 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
30
31
32
33
34
35
36
37
;;; init.el --- Where all the magic begins
;;
;; Part of the Sheeshmacs
;;
;; This is the first thing to get loaded.
;;
;; load Org-mode from source when the ORG_HOME environment variable is set
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(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 sheeshmacs from the `after-init-hook' so all packages are loaded
(add-hook 'after-init-hook
`(lambda ()
;; remember this directory
(setq sheeshmacs-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 sheeshmacs
(org-babel-load-file (expand-file-name "sheeshmacs.org" sheeshmacs-dir))))
;;; init.el ends here