diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/init.el b/init.el index e8b999d..60a63c2 100644 --- a/init.el +++ b/init.el | |||
@@ -1,21 +1,37 @@ | |||
1 | ;; init.el -*- lexical-binding: t -*- | 1 | ;; init.el -*- lexical-binding: t -*- |
2 | ;; This file is automatically tangled from config.org. | ||
3 | ;; Hand edits will be overwritten! | ||
2 | 4 | ||
5 | ;; Prefer newer files to older files | ||
6 | |||
7 | |||
8 | ;; [[file:~/.config/emacs/config.org::*Prefer newer files to older files][Prefer newer files to older files:1]] | ||
3 | (setq load-prefer-newer t) | 9 | (setq load-prefer-newer t) |
10 | ;; Prefer newer files to older files:1 ends here | ||
11 | |||
12 | ;; Load the config | ||
13 | |||
14 | ;; I keep most of my config in =config.el=, which is tangled directly | ||
15 | ;; from this file. This init just loads that file, either from lisp or | ||
16 | ;; directly from Org if it's newer. | ||
17 | |||
4 | 18 | ||
19 | ;; [[file:~/.config/emacs/config.org::*Load the config][Load the config:1]] | ||
5 | (let* (;; Speed up init | 20 | (let* (;; Speed up init |
6 | (gc-cons-threshold most-positive-fixnum) | 21 | (gc-cons-threshold most-positive-fixnum) |
7 | (file-name-handler-alist nil) | 22 | (file-name-handler-alist nil) |
8 | ;; Config file names | 23 | ;; Config file names |
9 | (conf (expand-file-name "config" | 24 | (conf (expand-file-name "config" |
10 | user-emacs-directory)) | 25 | user-emacs-directory)) |
11 | (conf-el (concat conf ".el")) | 26 | (conf-el (concat conf ".el")) |
12 | (conf-org (concat conf ".org"))) | 27 | (conf-org (concat conf ".org"))) |
13 | (unless (and (file-newer-than-file-p conf-el conf-org) | 28 | (unless (and (file-newer-than-file-p conf-el conf-org) |
14 | (load conf 'no-error)) | 29 | (load conf 'no-error)) |
15 | ;; A plain require here just loads the older `org' | 30 | ;; A plain require here just loads the older `org' |
16 | ;; in Emacs' install dir. We need to add the newer | 31 | ;; in Emacs' install dir. We need to add the newer |
17 | ;; one to the `load-path', hopefully that's all. | 32 | ;; one to the `load-path', hopefully that's all. |
18 | (add-to-list 'load-path (expand-file-name "straight/build/org" | 33 | (add-to-list 'load-path (expand-file-name "straight/build/org" |
19 | user-emacs-directory)) | 34 | user-emacs-directory)) |
20 | (require 'org) | 35 | (require 'org) |
21 | (org-babel-load-file conf-org))) | 36 | (org-babel-load-file conf-org))) |
37 | ;; Load the config:1 ends here | ||