summaryrefslogtreecommitdiffhomepage
path: root/readme.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-24 06:37:46 +0100
committerjao <jao@gnu.org>2021-05-24 06:37:46 +0100
commit832d146adb888974ed181147ca87bb49f371e79a (patch)
treeb6aa2c44913f69de4723fffc8ad26895f01cedc1 /readme.org
parent74d813373f82c4a5321a37ee0c308a3f54a8b702 (diff)
downloadelibs-832d146adb888974ed181147ca87bb49f371e79a.tar.gz
elibs-832d146adb888974ed181147ca87bb49f371e79a.tar.bz2
lexical tangling and optional loading
Diffstat (limited to 'readme.org')
-rw-r--r--readme.org16
1 files changed, 10 insertions, 6 deletions
diff --git a/readme.org b/readme.org
index 3a09675..4e0add8 100644
--- a/readme.org
+++ b/readme.org
@@ -1,5 +1,5 @@
#+title: Emacs configuration and personal packages
-#+property: header-args :tangle ~/.emacs.d/init.el :comments yes :results silent
+#+property: header-args :tangle ~/.emacs.d/init.el :comments no :results silent
#+auto_tangle: t
* Bootstrap
@@ -34,7 +34,7 @@
(package-initialize)
#+end_src
- and a tangling helper:
+ and a couple of tangling helper:
#+begin_src emacs-lisp
(defun jao-maybe-tangle (basename)
@@ -44,15 +44,20 @@
(require 'ob-tangle)
(org-babel-tangle-file org el))
el))
+
+ (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)))))
#+end_src
Finally, we load either init.org or its tangled version from
~jao-emacs-dir~:
#+begin_src emacs-lisp
- (if (require 'literate-elisp nil t)
- (literate-elisp-load-file (expand-file-name "init.org" jao-emacs-dir))
- (load-file (jao-maybe-tangle "init")))
+ (jao-load-org "init")
#+end_src
You can tangle this readme to generate the minimal init.el file above.
@@ -68,7 +73,6 @@
- [[./email.org][email.org]]: generic email handling in emacs.
- [[./gnus.org][gnus.org]]: tangled to gnus.el automatically by init.org, so that it's
ready for loading by Gnus.
-- [[./w3m.org][w3m.org]]: browsing with emacs-w3m.
- [[./eww.org][eww.org]]: browsing with eww.
- [[./exwm.org][exwm.org]]: configuration for exwm, loaded when ~jao-exwmn-enable~ is
called.