about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-10-27 13:41:40 -0500
committerCase Duckworth2020-10-27 13:41:40 -0500
commitf4a198ccf58de28d05a9aef5ad970dac6ee9dd50 (patch)
tree82e5e41126589948ae7ae9706c94cabc4677a1c2
parentComment out ligature.el (diff)
downloademacs-f4a198ccf58de28d05a9aef5ad970dac6ee9dd50.tar.gz
emacs-f4a198ccf58de28d05a9aef5ad970dac6ee9dd50.zip
Don't load init.el after tangling
It went into a forever loop... :(

I also made the function interactive, though without the loading idk if it's that important.
-rw-r--r--config.org5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.org b/config.org index 3bfc426..a655267 100644 --- a/config.org +++ b/config.org
@@ -37,13 +37,12 @@ After the first run, the above ~init.el~ will be replaced by the tangled stuff h
37 (defun acdw/tangle-init () 37 (defun acdw/tangle-init ()
38 "If the current buffer is `init.org', the code blocks are tangled, 38 "If the current buffer is `init.org', the code blocks are tangled,
39 and the tangled file is compiled and loaded." 39 and the tangled file is compiled and loaded."
40 (interactive)
40 (when (equal (buffer-file-name) 41 (when (equal (buffer-file-name)
41 (expand-file-name (concat user-emacs-directory "config.org"))) 42 (expand-file-name (concat user-emacs-directory "config.org")))
42 ;; Avoid running hooks when tangling. 43 ;; Avoid running hooks when tangling.
43 (let ((prog-mode-hook nil)) 44 (let ((prog-mode-hook nil))
44 (org-babel-tangle) 45 (org-babel-tangle))))
45 (load-file (concat user-emacs-directory "early-init.el"))
46 (load-file (concat user-emacs-directory "init.el")))))
47 46
48 (add-hook 'after-save-hook #'acdw/tangle-init) 47 (add-hook 'after-save-hook #'acdw/tangle-init)
49#+END_SRC 48#+END_SRC