config/literate: revise readme

This commit is contained in:
Henrik Lissner 2020-08-12 02:42:05 -04:00
parent 809eae331f
commit f5ba3d9498
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -21,9 +21,8 @@
* Description * Description
This module enables support for a literate config. This module enables support for a literate config.
A literate config consists of a =DOOMDIR/config.org=, which can be tangled to A literate config consists of a =DOOMDIR/config.org=. All src blocks within are
any file(s) you like. By default, elisp src blocks are tangled to =config.el= tangled =DOOMDIR/config.el=, by default, when ~doom sync~ is executed.
whenever ~doom sync~ is executed.
** Maintainers ** Maintainers
This module has no dedicated maintainers. This module has no dedicated maintainers.
@ -54,13 +53,13 @@ highlighting. If you don't want to specify language in block you can also
enforce tangling by adding ~#+BEGIN_SRC :tangle yes~ enforce tangling by adding ~#+BEGIN_SRC :tangle yes~
** Change where src blocks are tangled or prevent it entirely ** Change where src blocks are tangled or prevent it entirely
By default, this module tangles all src blocks (with a valid language) to By default, this module tangles all src emacs-lisp blocks to config.el unless
config.org unless otherwise specified. otherwise specified.
To specify otherwise use the =:tangle= parameter to: To specify otherwise use the =:tangle= parameter to:
- Specify a destination other than config.el, like packages.el - Specify a destination other than config.el: ~:tangle packages.el~
- Disable tangling of the block altogether - Disable tangling of the block altogether with ~:tangle no~
- Or force non-elisp src blocks to tangle somewhere - Or force non-elisp src blocks to tangle somewhere
For example: For example:
@ -84,6 +83,9 @@ echo Hello world
,#+END_SRC ,#+END_SRC
#+END_SRC #+END_SRC
You'll find more information about babel src blocks and what parameters they
support [[https://www.gnu.org/software/emacs/manual/html_node/org/Working-with-source-code.html#Working-with-source-code][in the manual]].
** Modularizing your literate config with ~#+INCLUDE~ directives ** Modularizing your literate config with ~#+INCLUDE~ directives
Literate configs can be split up into separate files and imported into a central Literate configs can be split up into separate files and imported into a central
=config.org= using the ~#+INCLUDE~ org directive. Here are some examples: =config.org= using the ~#+INCLUDE~ org directive. Here are some examples: