summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-10-05 23:01:55 -0700
committerBlendoit <blendoit@gmail.com>2020-10-05 23:01:55 -0700
commitee826b2e1d84f35406b3885607caa13e143ec482 (patch)
treec5dcced059edad68227191dd1ea0cb3564300ff3 /init.el
parent5cc72005748960596a7e0003cdf34b95685b03b3 (diff)
Start work on early-init.el
Diffstat (limited to 'init.el')
-rw-r--r--init.el24
1 files changed, 14 insertions, 10 deletions
diff --git a/init.el b/init.el
index 9f56fa4..228062c 100644
--- a/init.el
+++ b/init.el
@@ -1,19 +1,23 @@
-;;; init.el --- bootstrap main Emacs config from USB drive.
+;;; init.el --- Load literate configuration file, smart-documents.org.
;;; Commentary:
-;; This package enables bootstrapping a full `.emacs.d/' configuration
-;; residing on a removable drive. It is copied over from
-;; init-bootstrap.el to init.el, at a location the OS expects to find
-;; that file. Then, every time Emacs is started, it will scan the top
-;; level of all typical mount points in an effort to detect an
-;; existing `.emacs.d/'.
+;; This file's sole purpose is to load our literate configuration file.
;;; Code:
-(org-babel-load-file "~/.emacs.d/smart-documents.org")
-(setq my/literate-config (concat user-emacs-directory "smart-documents.org"))
-;; (setq my/literate-config-compiled (concat user-emacs-directory "blendoit-init.elc"))
+;; First of all, we indicate the path to our literate configuration file.
+(setq my/literate-config (concat user-emacs-directory "smart-documents"))
+
+;; Emacs will startup faster next time, because it will load
+;; a byte-compiled version of our literate configuration file.
+(cond ((file-exists-p (concat my/literate-config ".elc"))
+ (load (concat my/literate-config ".elc")))
+ ((file-exists-p (concat my/literate-config ".el"))
+ (load (concat my/literate-config ".el")))
+ ((file-exists-p (concat my/literate-config ".org"))
+ (org-babel-load-file (concat my/literate-config ".org")))
+ (t (message "There appears to be no literate configuration file. Reinstall?")))
(provide 'init)
Copyright 2019--2024 Marius PETER