Hi Aaron
First of all, no issue arises with :output-dir alone. It can be
specified as a global header arg without issue.
Yes, now I check again that's true. Thank you for clearing that up.
I designed :file-ext as a direct replacement for :file. That is, instead
of the above, one would specify:
#+name: foo
#+begin_src R :file-ext pdf
...
#+end_src
and get the same result. IOW, the design was *not* for :file-ext to be
specified globally.
Now I understand how it was intended (a shortcut for people who are
scrupulous about using #+NAME) it makes sense. I was thinking it was
meant as an easy way to switch globally between different formats
(sometimes I want PDF for ease, sometimes I want Tikz for
publication-quality, sometimes I want SVG for online etc.).
The change Nicolas proposes is how I would make :file-ext work if I were
writing it from scratch today, with the benefit of hindsight. I worry
that introducing it would break org documents in the wild, but maybe it is
worth it.
You (all) are a better judge of what is a reasonable non-back-compatible
change.
all the best
alex