From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: What determines if R source block output is wrapped in begin_example or not?
Date: Thu, 13 Jan 2022 21:04:56 -0600 [thread overview]
Message-ID: <CA+M2ft8B=_uRFa1SAFR4dx0ThNEFt-SMZwweL2gLRnd1QiEwFA@mail.gmail.com> (raw)
In-Reply-To: <CA+M2ft9RKFQTcp3YkQURNqMe2i_nfvrkCDB=C=JjSy8OuWK+WQ@mail.gmail.com>
Possible false alarm. As I continued to work on this, I accidentally
didn't use :results output code, yet the formatting was fine... I'm
wondering if I had a dangling #+begin_src with no matching end?
Still, I am intrigued by the toggle between prepending with ":" and
wrapping in example blocks, despite what appears to be no practical
impact at this point.
John
On Thu, Jan 13, 2022 at 2:49 PM John Hendy <jw.hendy@gmail.com> wrote:
>
> Greetings,
>
> 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
> data.frame(
> x = c(1:3))
> #+end_src
>
> #+RESULTS:
> : 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
> data.frame(
> x = c(1:9))
> #+end_src
>
> #+RESULTS:
> #+begin_example
> x
> 1 1
> 2 2
> 3 3
> 4 4
> 5 5
> 6 6
> 7 7
> 8 8
> 9 9
> #+end_example
>
> I see nothing like this mentioned in the docs on the results of evaluation:
> https://orgmode.org/manual/Results-of-Evaluation.html
>
> 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,
> John
next prev parent reply other threads:[~2022-01-14 3:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 20:49 What determines if R source block output is wrapped in begin_example or not? John Hendy
2022-01-14 3:04 ` John Hendy [this message]
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:
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='CA+M2ft8B=_uRFa1SAFR4dx0ThNEFt-SMZwweL2gLRnd1QiEwFA@mail.gmail.com' \
--to=jw.hendy@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).