diff options
author | jao <jao@gnu.org> | 2021-10-16 21:51:31 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-10-16 21:51:31 +0100 |
commit | 3d945d9256eed46a84f52ad87908031fc39111bd (patch) | |
tree | 1d71a70fa5ede9dd57af803c2d8405f50231d68e | |
parent | 190473bf7cda9a1c5e4ed44c5a32c9c6fddf4098 (diff) | |
download | elibs-3d945d9256eed46a84f52ad87908031fc39111bd.tar.gz elibs-3d945d9256eed46a84f52ad87908031fc39111bd.tar.bz2 |
~/.emacs/init.el simplification via org-babel-load-file
-rw-r--r-- | readme.org | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -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 |