From 3d945d9256eed46a84f52ad87908031fc39111bd Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 16 Oct 2021 21:51:31 +0100 Subject: ~/.emacs/init.el simplification via org-babel-load-file --- readme.org | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/readme.org b/readme.org index 0fced5c..9b208b7 100644 --- a/readme.org +++ b/readme.org @@ -39,23 +39,13 @@ (package-initialize) #+end_src - and a couple of tangling helper: + and a tangling helper: #+begin_src emacs-lisp - (defun jao-maybe-tangle (basename) - (let ((el (expand-file-name (format "%s.el" basename) jao-emacs-dir)) - (org (expand-file-name (format "%s.org" basename) jao-emacs-dir))) - (when (file-newer-than-file-p org el) - (require 'ob-tangle) - (org-babel-tangle-file org el)) - el)) - + (require 'org) (defun jao-load-org (file) - (let ((b (file-name-sans-extension file))) - (if (require 'literate-elisp nil t) - (let ((file (format "%s.org" b))) - (literate-elisp-load-file (expand-file-name file jao-emacs-dir))) - (load-file (jao-maybe-tangle b))))) + (let ((file (concat (file-name-sans-extension file) ".org"))) + (org-babel-load-file (expand-file-name file jao-emacs-dir)))) #+end_src Finally, we load either init.org or its tangled version from -- cgit v1.2.3