3 Commits

Author SHA1 Message Date
Alex Birdsall
4afe5ca09a fix(org,cli): tangle: load ob-* libs for noweb-usable blocks
For performance reasons, Doom CLI runs in a minimal environment wherein
no `ob-<language>` libraries are initially loaded; but tangling a
document with noweb-enabled blocks can trigger an org-babel evaluation
of any noweb-addressable block; and any such evaluation will fail
tangling with an error unless the correct `ob-<language>` library has
been loaded.

So. This changes the tangle CLI function to note any noweb-addressable
labels (i.e. any `#+NAME:` or `:noweb-ref` associated with a block) when
iterating through the source document's blocks; for each block where one
is found, it conditionally attempts to `require` the corresponding
`ob-<src-lang>` library.
2025-08-10 15:49:18 +02:00
Henrik Lissner
0a715cc3f2 refactor: (if|when)-let -> (if|when)-let*
With the former macros' future in the air (and likely to be targeted in
future, potentially breaking changes), I'll deal with this now than have
it bite me later.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
2025-01-08 19:33:37 -05:00
Henrik Lissner
295ab7ed3a feat(org): add "doom +org tangle" command
Introduces a formal bin/doom command for tangling files, to replace the
non-functional bin/org-capture binscript.

Close: #6599
Close: #6267
2024-09-01 17:53:44 -04:00