emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <esflists@gmail.com>
To: Lawrence Bottorff <borgauf@gmail.com>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: HTML :exports both problem
Date: Mon, 19 Nov 2018 15:51:42 +0000	[thread overview]
Message-ID: <87lg5pdq0h.fsf@gmail.com> (raw)
In-Reply-To: <CAFAhFSXaLHaABJzVEA4Oo05=63Ba=RMaxxerF1LY_kscdL+yOg@mail.gmail.com> (Lawrence Bottorff's message of "Mon, 19 Nov 2018 09:02:37 -0600")

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

  reply	other threads:[~2018-11-19 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19  5:55 HTML :exports both problem Lawrence Bottorff
2018-11-19  9:16 ` Eric S Fraga
2018-11-19 15:02   ` Lawrence Bottorff
2018-11-19 15:51     ` Eric S Fraga [this message]
2018-11-19 16:16     ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lg5pdq0h.fsf@gmail.com \
    --to=esflists@gmail.com \
    --cc=borgauf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).