summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-16 21:51:31 +0100
committerjao <jao@gnu.org>2021-10-16 21:51:31 +0100
commit3d945d9256eed46a84f52ad87908031fc39111bd (patch)
tree1d71a70fa5ede9dd57af803c2d8405f50231d68e
parent190473bf7cda9a1c5e4ed44c5a32c9c6fddf4098 (diff)
downloadelibs-3d945d9256eed46a84f52ad87908031fc39111bd.tar.gz
elibs-3d945d9256eed46a84f52ad87908031fc39111bd.tar.bz2
~/.emacs/init.el simplification via org-babel-load-file
-rw-r--r--readme.org18
1 files 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