[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] HTML :exports both problem
From: |
Eric S Fraga |
Subject: |
Re: [O] HTML :exports both problem |
Date: |
Mon, 19 Nov 2018 15:51:42 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On Monday, 19 Nov 2018 at 09:02, Lawrence Bottorff wrote:
> That did the trick.
Great!
> Though I'm wondering why the #+name: would cause such craziness.
Probably because org tries to place the result of the src block after
the associated results line if it is a named src block. With no name, I
imagine it looks for a results block with no name as well. If the name
statement is not used, the results come immediately after the src block.
> . . 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
[...]
> #+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?
By default, "output" is placed in the buffer as an example. If less
than a certain number of lines (10?), each line is prefixed with
":". If there are more lines, they are placed in the example block, as
you have seen. The manual doesn't seem to say this however.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442