On Tuesday, 12 Jul 2022 at 14:53, alain.coch...@unistra.fr wrote:
> So far so good.  (Well almost: why does '#+RESULTS:' show 'bar' and
> not 'foo'?  After all, I'm just setting 'my-var', I'm not asking to
> display its value.  But that's incidental.)

It's not incidental.  By default, the results of a src block evaluation
is the value of the src block which is typically the value returned by
the last statement.  You can modify this by adding

:results output

for instance to the begin_src line.

> (test 2) Same org file.  If I do 'C-c C-e l o', no question is asked,
> no '#+RESULTS:' block is inserted, and the resulting pdf file shows:

On export, the default is to export the code.  If you want the results,
you need to add

:exports results

or if you want both code and results,

:exports both

-- 
: Eric S Fraga, with org release_9.5.4-613-gb3b17c in Emacs 29.0.50

Reply via email to