From 3cd24ff4c8662d9a734fafc66569232f34e3b5ae Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 16 Dec 2020 19:10:21 -0600 Subject: Change init.el to load config.org if it’s newer … I think. Needs testing. --- config.org | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config.org b/config.org index 70c49e4..72aeea4 100644 --- a/config.org +++ b/config.org @@ -1238,11 +1238,14 @@ from [[https://karthinks.com/software/more-batteries-included-with-emacs/#regexp inspired by [[https://protesilaos.com/dotemacs/#h:584c3604-55a1-49d0-9c31-abe46cb1f028][Protesilaos Stavrou]]. #+begin_src emacs-lisp - (let ((conf (expand-file-name "config" - user-emacs-directory))) - (unless (load conf 'no-error) + (let* ((conf (expand-file-name "config" + user-emacs-directory)) + (conf-el (concat conf ".el")) + (conf-org (concat conf ".org"))) + (unless (and (file-newer-than-file-p conf-el conf-org) + (load conf 'no-error)) (require 'org) - (org-babel-load-file (concat conf ".org")))) + (org-babel-load-file conf-org))) #+end_src *** early-init.el -- cgit 1.4.1-21-gabe81