+description for oredave/literate/compile-hook

This commit is contained in:
odave
2020-03-17 17:45:16 +00:00
parent 61a91e376d
commit 10ed4eae24

View File

@@ -70,6 +70,7 @@ loaded. README.org has been added as an exception because it doesn't contain
literate contents. literate contents.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(defun oreodave/literate/compile-hook () (defun oreodave/literate/compile-hook ()
"Any org file within $DOOM/config will be compiled on save"
(when (and (eq major-mode 'org-mode) (when (and (eq major-mode 'org-mode)
(or (file-in-directory-p buffer-file-name doom-private-dir) (or (file-in-directory-p buffer-file-name doom-private-dir)
(file-in-directory-p buffer-file-name (concat doom-private-dir "config"))) (file-in-directory-p buffer-file-name (concat doom-private-dir "config")))
@@ -89,8 +90,8 @@ because this is the function we'll be using for tangling all org files to ELisp
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(defun oreodave/literate/tangle-all (&optional location) (defun oreodave/literate/tangle-all (&optional location)
"Tangle all org files in `location' to el files in the `destination'" "Tangle all org files in `location' to el files in the `destination'"
(or location (setq location doom-private-dir))
(interactive) (interactive)
(or location (setq location doom-private-dir))
(message "Starting compilation process") (message "Starting compilation process")
(let ((files (directory-files-recursively location ".org"))) (let ((files (directory-files-recursively location ".org")))
(dolist (file files) (dolist (file files)