From 5f1f3c1e606eda0f65ca0f3d4dcf2e46744f0134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Alvari=C3=B1o?= Date: Tue, 6 Jun 2023 20:26:09 +0200 Subject: [PATCH] Add emacs configuration file in org-mode format * emacs configuration file in org-mode format is loaded from init.el --- init.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/init.el b/init.el index 8e0f28b..18e3d80 100644 --- a/init.el +++ b/init.el @@ -59,6 +59,19 @@ ;; Install org-mode (straight-use-package 'org) ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Load myconfig file. +(let ((config-el (expand-file-name "myconfig.el" user-emacs-directory)) + (config-org (expand-file-name "myconfig.org" user-emacs-directory))) + (if (and (file-exists-p config-el) + (file-exists-p config-org) + (time-less-p (file-attribute-modification-time (file-attributes config-org)) + (file-attribute-modification-time (file-attributes config-el)))) + (load-file config-el) + (if (file-exists-p config-org) + (org-babel-load-file config-org) + (error "No file `%s' found!! No configuration loaded!!" config-org)))) +;; ;; (provide 'init) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;