about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-11-09 13:47:45 -0600
committerCase Duckworth2020-11-09 13:47:45 -0600
commit11afb81cb0160d21452fd32f575b4468536c9689 (patch)
tree72634403026b1c6b4c51d4ba91296aaece966d79
parentAdd visual-fill-column-mode to gemini-mode-hook (diff)
downloademacs-11afb81cb0160d21452fd32f575b4468536c9689.tar.gz
emacs-11afb81cb0160d21452fd32f575b4468536c9689.zip
Asyncify tangling
-rw-r--r--config.org18
1 files changed, 14 insertions, 4 deletions
diff --git a/config.org b/config.org index 9060061..f396166 100644 --- a/config.org +++ b/config.org
@@ -69,10 +69,20 @@ After the first run, the above ~init.el~ will be replaced by the tangled stuff h
69 and the tangled file is compiled and loaded." 69 and the tangled file is compiled and loaded."
70 (interactive) 70 (interactive)
71 (when (equal (buffer-file-name) 71 (when (equal (buffer-file-name)
72 (expand-file-name (concat user-emacs-directory "config.org"))) 72 (expand-file-name
73 ;; Avoid running hooks when tangling. 73 (concat user-emacs-directory "config.org")))
74 (let ((prog-mode-hook nil)) 74 ;; Now with async!
75 (org-babel-tangle)))) 75 (require 'async)
76 (async-start
77 `(lambda ()
78 ;; Avoid running hooks when tangling.
79 (let ((prog-mode-hook nil))
80 (require 'org)
81 (org-babel-tangle-file
82 (expand-file-name
83 (concat user-emacs-directory "config.org")))))
84 (lambda (_)
85 (message "Tangle complete.")))))
76 86
77 (add-hook 'after-save-hook #'acdw/tangle-init) 87 (add-hook 'after-save-hook #'acdw/tangle-init)
78#+END_SRC 88#+END_SRC