emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: What determines if R source block output is wrapped in begin_example or not?
Date: Thu, 13 Jan 2022 14:49:40 -0600	[thread overview]
Message-ID: <CA+M2ft9RKFQTcp3YkQURNqMe2i_nfvrkCDB=C=JjSy8OuWK+WQ@mail.gmail.com> (raw)


I was perplexed when a table in my exported latex/pdf document came
out garbled, to find out it's being included like "normal text." In
another block with well-behaving output, I observed the same src
header args, but it was wrapped in #+begin/end_example for free,
without me trying.

Here's a reproducible example. This output would not look right when exported:

#+begin_src R :exports results :results output :eval yes
  x = c(1:3))

:   x
: 1 1
: 2 2
: 3 3

From trial and error, it seems the magical length is 9 where it gets wrapped:

#+begin_src R :exports results :results output :eval yes
  x = c(1:9))

1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

I see nothing like this mentioned in the docs on the results of evaluation:

For now, my workaround is to use :results output code. I guess my
typical output must usually be longer than 9, or I use :results value
and manually add header rows to the generated org table, as I don't
recall dealing with this before!

Thanks for help understanding.

Best regards,

             reply	other threads:[~2022-01-13 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 20:49 John Hendy [this message]
2022-01-14  3:04 ` What determines if R source block output is wrapped in begin_example or not? John Hendy
2022-01-14  9:48   ` Eric S Fraga
2022-01-14 13:13     ` John Hendy
2022-01-14 14:04       ` Eric S Fraga
2022-01-14 14:44         ` Ihor Radchenko

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:

  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='CA+M2ft9RKFQTcp3YkQURNqMe2i_nfvrkCDB=C=JjSy8OuWK+WQ@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).