Fix void-function org-export--prepare-file-contents error #6

Merged
hlissner merged 1 commits from require-ox into master 2022-08-06 19:01:00 +00:00
hlissner commented 2022-08-06 16:03:23 +00:00 (Migrated from github.com)

org-glossary--include-once calls org-export--prepare-file-contents, which is defined in ox, but ox is not loaded.

This happens because org-export--prepare-file-contents (defined in
ox) is called in org-glossary--include-once, which will be called when org-glossary-mode is activated, having been given an external source to look up terms in. E.g.

(setq org-glossary-global-terms (list "~/path/to/glossary.org"))
(add-hook 'org-mode-hook #'org-glossary-mode)

I decided to load ox from org-export--prepare-file-contents rather than top-level, because all other uses of ox's API are autoloaded, and I'm a fan of lazy-loading.

`org-glossary--include-once` calls `org-export--prepare-file-contents`, which is defined in `ox`, but `ox` is not loaded. This happens because `org-export--prepare-file-contents` (defined in `ox`) is called in `org-glossary--include-once`, which will be called when `org-glossary-mode` is activated, having been given an external source to look up terms in. E.g. ```elisp (setq org-glossary-global-terms (list "~/path/to/glossary.org")) (add-hook 'org-mode-hook #'org-glossary-mode) ``` I decided to load `ox` from `org-export--prepare-file-contents` rather than top-level, because all other uses of `ox`'s API are autoloaded, and I'm a fan of lazy-loading.
tecosaur commented 2022-08-06 16:13:39 +00:00 (Migrated from github.com)

Thanks! Stylistically, I think I'd prefer this above line 403 (let ((lines..., but other than that LGTM 👍

Thanks! Stylistically, I think I'd prefer this above line 403 `(let ((lines...`, but other than that LGTM :+1:
Sign in to join this conversation.
No description provided.