Sébastien Miquel <sebastien.miq...@posteo.eu> writes: > What benefits does that bring over making enabled features available in > =info= for the usual transcoders and advising them ?
We should indeed make the features/condition available via info. However, advising is (1) bad practice unless we have no choice; (2) not as flexible. I will illustrate below. > Your initial example of adding a comment to the end and beginning of the > document can be done by advising, say, =org-latex-template= and > concatenating some strings with its =content= argument. What you suggest is indeed an OK alternative for my specific example of adding text to the beginning/end of the document. However, it will be much harder to add something in the middle of the exported contents. Consider that you want to redefine a LaTeX command after certain \usepackage{foo} call in LaTeX preamble, but before another \usepackage{bar} call. Let's assume that the preamble template has the following: (:template . (... (:name 'foo :snippet "\\usepackage{foo}") ... (:name 'bar :snippet "\\usepackage{bar}") ...)) Now, we can simply add the following snippet to the template: (:snippet "<define LaTeX command>" :after 'foo :before 'bar) and the definition will be automatically inserted at the right place in the middle of the LaTeX preamble. -- Ihor Radchenko // yantar92, Org mode contributor, 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>