summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el22
1 files changed, 9 insertions, 13 deletions
diff --git a/init.el b/init.el index 221956c..332468c 100644 --- a/init.el +++ b/init.el
@@ -39,16 +39,12 @@ If COMMANDS is empty or nil, simply return the result of CONDITIONS."
39 (config.org (concat config ".org")) 39 (config.org (concat config ".org"))
40 (straight-org-dir (expand-file-name "straight/build/org" 40 (straight-org-dir (expand-file-name "straight/build/org"
41 user-emacs-directory))) 41 user-emacs-directory)))
42 ;; Unless config.org is /newer/ than config.el, *or* the config 42 (unless (load config 'no-error))
43 ;; is able to be loaded without errors, load the config from 43 ;; A plain require here just loads the older `org'
44 ;; config.org. 44 ;; in Emacs' install dir. We need to add the newer
45 (unless (or (file-newer-than-file-p config.org config.el) 45 ;; one to the `load-path', hopefully that's all.
46 (load config 'no-error)) 46 (when (file-exists-p straight-org-dir)
47 ;; A plain require here just loads the older `org' 47 (add-to-list 'load-path straight-org-dir))
48 ;; in Emacs' install dir. We need to add the newer 48 ;; Load config.org
49 ;; one to the `load-path', hopefully that's all. 49 (require 'org)
50 (when (file-exists-p straight-org-dir) 50 (org-babel-load-file config.org :compile))
51 (add-to-list 'load-path straight-org-dir))
52 ;; Load config.org
53 (require 'org)
54 (org-babel-load-file config.org)))