2

When executing a source block in org mode with the output set to verbatim, it will sometimes wrap the results in an #begin_example block, and sometimes it uses : symbols at the beginning of the line. How can I force it to do one or the other?

1 Answer 1

3

This behaviour is controlled by the variable org-babel-min-lines-for-block-output:

The minimum number of lines for block output. If number of lines of output is equal to or exceeds this value, the output is placed in a #+begin_example...#+end_example block. Otherwise the output is marked as literal by inserting colons at the starts of the lines. This variable only takes effect if the :results output option is in effect.

The default value for this variable is 10. So if you want to force babel to use :, you need to set this to a suitably large number, e.g.,

(setq org-babel-min-lines-for-block-output 1000)

Conversely, you can set it to 0 to force babel to always use the begin_example format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.