"Pedro A. Aranda" <[email protected]> writes:

>>>> +  ;; Before doing anything else, add the script information
>>>> +  ;; to the INFO channel. Used by org-latex-make-preamble
>>>> +  ;; to add fallback fonts for lualatex.
>>>> +  (setq info (plist-put info
>>>> +                        :doc-scripts
>>>> +                        (org-get-string-scripts contents)))
>>>> +
>>> May we do the same in :filter-body instead? Then, we can just arrange
>>> calling org-get-string-scripts in ox-latex without a need to repeat the
>>> procedure in ox-beamer.
>> Will see and put that as the last patch in [1]
>
> I don't see :filter-body begin referenced anywhere in Org except in ox.el:

It is one of the examples of :filters-alist.

> So I could say that the default value for 
> `org-export-filter-body-functions' is a list with the new filter 
> function or I could push that in the body of ox.el (whatever is easier 
> for you).
>
> My reservation is that someone may have personal filters and the font 
> detection filter is overwritten when he/she installs them.
>
> That's my reason for putting this stuff in ox-latex/ox-beamer.

You can follow the pattern used in ox-md:

(org-export-define-derived-backend 'md 'html
  :filters-alist '((:filter-parse-tree . org-md-separate-elements))

The user filters and backend filter are combined together in
`org-export-install-filters'.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to