Lawrence Bottorff <borg...@gmail.com> writes: > That did the trick. Though I'm wondering why the #+name: would cause such > craziness. . . Also, would anyone know why > > #+begin_src lisp :results output :exports both > (dotimes (x 20) > (dotimes (y 20) > (format t "~3d " (* (1+ x) (1+ y)))) > (format t "~%")) > #+end_src > > produces > > #+RESULTS: > #+begin_example > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 > 20 > 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 > 40 > ... > #+end_example > > which is great. How did it know to sandwich the output between > #+begin_example/#+end_example, thereby preserving the linefeeds? That's > amazing. Is there a way to toggle that behavior? >
I believe this is controlled by `org-babel-min-lines-for-block-output'. Help on this variable says: ,---- | org-babel-min-lines-for-block-output is a variable defined in ‘ob-core.el’. | Its value is 10 | | Documentation: | 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. `---- -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler