Refactor config/literate module
+ Now recompiles literate config if you modify org files in DOOMDIR + Replaced +literate/compile with +literate/reload + Calls org-babel-tangle-file directly if org package is loaded + Change mtime check mechanism for literate tangling at startup
This commit is contained in:
parent
b3d931d7ce
commit
5cdc2127be
2 changed files with 35 additions and 21 deletions
|
@ -1,7 +1,14 @@
|
|||
;;; config/literate/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +literate/compile (&optional load)
|
||||
"TODO"
|
||||
(interactive "P")
|
||||
(+literate-compile load))
|
||||
(defalias '+literate/reload #'doom/reload)
|
||||
|
||||
;;;###autoload
|
||||
(defun +literate|recompile-maybe ()
|
||||
"Recompile config.org if we're editing an org file in our DOOMDIR.
|
||||
|
||||
We assume any org file in `doom-private-dir' is connected to your literate
|
||||
config, and should trigger a recompile if changed."
|
||||
(when (and (eq major-mode 'org-mode)
|
||||
(file-in-directory-p buffer-file-name doom-private-dir))
|
||||
(+literate-tangle 'force)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue