diff options
author | AChavali <aryadevchavali1@gmail.com> | 2019-12-30 23:29:11 +0000 |
---|---|---|
committer | AChavali <aryadevchavali1@gmail.com> | 2019-12-30 23:29:11 +0000 |
commit | abfb93bb3779799a773ffc4def4cd8bfb2c83d62 (patch) | |
tree | ee5cca11f79bd24e419df0b2132d64d7ee795b91 /doom.d | |
parent | bc0eb86b03b4e5ab70598280acb91c063827acf0 (diff) | |
download | dotfiles-abfb93bb3779799a773ffc4def4cd8bfb2c83d62.tar.gz dotfiles-abfb93bb3779799a773ffc4def4cd8bfb2c83d62.tar.bz2 dotfiles-abfb93bb3779799a773ffc4def4cd8bfb2c83d62.zip |
~tangle-all takes a location to source files from
Instead of being attached to the doom.d private config set, I can use
this function to route to another directory if wished
Diffstat (limited to 'doom.d')
-rw-r--r-- | doom.d/modules/literate.org | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doom.d/modules/literate.org b/doom.d/modules/literate.org index dba59b0..59ab9cf 100644 --- a/doom.d/modules/literate.org +++ b/doom.d/modules/literate.org @@ -53,18 +53,20 @@ case the bin folder in the private directory This is not fitted onto the parser because the parser could be fitted to multiple /differing/ outputs easily if it isn't specified a destination. * Procedure for all files -We need a procedure that parses all the org files in the doom-private-dir and -modules directory into Emacs lisp files, using the parser function we've made. -Assume all org files in the private directory contribute to the config. +A procedure that parses all the org files in a given directory into Emacs lisp +files, using the parser function made. Assume all org files in the "location" +directory contribute to the config. #+BEGIN_SRC elisp -(defun oreodave/literate/tangle-all () +(defun oreodave/literate/tangle-all (location) (interactive) (message "Starting compilation process") - (let ((files (directory-files-recursively "~/.doom.d/" ".org"))) + (let ((files (directory-files-recursively location ".org"))) (dolist (file files) (message "Compiling and parsing %s" file) (oreodave/literate/tangle file (oreodave/literate/destination file))))) #+END_SRC +The location is not set because this function could be easily programmed to use +multiple /differing/ sources to produce the config. * Hook on save Now we need to make a hook that, when the current buffer is an org file in the doom directory, will run the literate config procedure from above. |