Joseph Turner <jos...@breatheoutbreathe.in> writes: >> The solution will be simply removing the default :results setting. > > I think you're suggesting something like this: > > (defvar org-babel-default-header-args:plantuml > '((:exports . "results")) > "Default arguments for evaluating a plantuml source block.") > > With this change, if you *do* add a :file arg, like in the following > example, then no output will be produced: > > #+begin_src plantuml :file "this.png" > Bob->Alice : Hello1! > #+end_src > > #+RESULTS: > > which is also wrong.
> What would the code look like if we wanted to change the > org-babel-default-header-args:plantuml variable inside the > org-babel-execute:plantuml function based on the value of the params > arg? Or perhaps you have a different solution? You can examine :result-params property inside params plist. If that property does not explicitly mention different results Type (see 16.6 Results of Evaluation), ob-plantuml may set the type to "file" with plist-put. Best, Ihor