Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Andreas Leha <andreas.l...@med.uni-goettingen.de> writes: > >> Seems to work fine! >> >> Just note, that it works for me only after exporting >> (when tested under emacs -Q). > > `org-export-current-backend' is set when exporting a document, much like > `backend'. >
The same protection as in the previous version seems to take effect here: (defmacro by-backend (&rest body) `(case (if (boundp 'org-export-current-backend) org-export-current-backend nil) ,@body)) Are there any issues with this? >> What about including that into org? > > Wrong namespace. It should be prefixed with "org". > Easy to fix. > Also, it might be better to include it directly in :file directive > handling if that is its sole purpose. Could you elaborate why that might be better? Including it as a macro like this has the up-side to be more general.n I think that also other header arguments would benefit from such a (org-)by-backend switch. In former versions (pre-dating the handling of *.tikz 'images' by ox-latex) of the tikz code in this thread, for example, the :results argument needed to be set according to the backend as well Regards, Andreas