# Why does my latex src code block ignore exports header arguments

GNU Emacs 25.1.50.2

Org-mode version 8.3.5

At some point in the past I could put down a block like this

#+begin_src latex :exports results :results {latex|html}

a = 1 + b
\end{eqation}
#+end_src


For either html or latex and make it export to the corresponding format. This functionality have for some reason disappeared and now it exports the src block as a code block instead of the results that exports to nice native latex or html math and rendered that way.

I find it convenient to be able to do this, for a number of reasons, so it would be nice if there was a way to make this work again.

• This is how I did it: raw.githubusercontent.com/wvxvw/introduction-to-data-structures/… (see by-backend macro). The commented out version is the one I used with some older version of Org. Aug 21 '16 at 15:57
• Thanks for your reply. For some reason this doesn't seem to do anything for me. Even starting from a fresh slate with -q doesn't yield and output from my code block with a header from your example and a macro defined. Aug 21 '16 at 21:29
• Sorry if this is obvious, just making sure: you evaluated the code with the macro (for example you C-c C-c on the code block with the macro). You then used #+HEADER: :results (by-backend (pdf "latex") (t "raw")) in your latex code block. The results were actually produced, but without change (rather than, for example, Org exporter dying silently, while leaving the results from the previous export). Aug 22 '16 at 4:53
• Yeah, I did this but after further investigation it seems like my config is to blame. Haven't found the faulty code yet but I have to backpadle for blaming orgmode changes. Thanks for your answer @wvxvw. Aug 22 '16 at 17:31
• Turns out I carelessly set the variable (setq org-export-babel-evaluate nil) which according to the documentation disregards all header arguments. Looks like more than just this issue just got solved for me... Not sure if I should delete this question or rewrite it to be more relevant. Aug 22 '16 at 18:39

(setq org-export-babel-evaluate nil)

After setting this to t I could export as expected.