emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Greg Minshall <minshall@umich.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: org-in-org
Date: Sun, 7 Mar 2021 22:26:53 +0000	[thread overview]
Message-ID: <BA67E5F1-73D3-4E47-A8FA-0DBD4A035795@health.ucsd.edu> (raw)
In-Reply-To: <1775874.1615133649@apollo2.minshall.org>

> On Mar 7, 2021, at 8:14 AM, Greg Minshall <minshall@umich.edu> wrote:
> Charles,
> thanks.  any thing you'd like to add to the R-via-ESS/org-mode
> repository, that would be great.
> in general, afaik, the contents of org-in-org buffers export okay.  at
> least plain ones.  would could like to have the embedded code blocks go
> through some pretty-printer, but currently i don't see that as an issue.
> as i mentioned to Jeremie, an issue is getting the org-in-org block to
> do its export.  i don't know if creating a recursive "execute" function
> for org source blocks -- which would cause them (modulo :eval, :exports,
> etc.) to evaluate their source blocks -- might be useful.

Sorry, I do not know what a  `recursive "execute" function' would be/do in this context.


You said to Jeremie:
"during export of the *outer* org document, it could cause
the inner org block(s) to be executed and their results revealed."

AFAICS, the document below does exactly that upon export and can be exported using a command line idiom with proper attention to init-file issues (and let binding `org-confirm-babel-evaluate' to nil if you want to run in batch mode). 

As an example, html export will create a document that displays a `<pre class="src src-org"...> block with the R src block named `readdata-code' and the `#+RESULTS: readdata-code' block in it. 

--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp :exports results :results none
  (org-babel-map-executables nil 
    (let ((org-confirm-babel-evaluate nil))

#+NAME: readdata-code
  ,#+NAME: readdata-code
  ,#+BEGIN_SRC R :results output

  read.csv(text="a,b,c\n1,2,3\n4,5,6",header=T) -> mydata1


--8<---------------cut here---------------end--------------->8---

If that isn't what is needed, maybe you can provide the desired output when exporting the above sans the emacs-lisp src block.


  reply	other threads:[~2021-03-07 22:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 14:24 org-in-org Greg Minshall
2021-02-23 19:46 ` org-in-org Berry, Charles via General discussions about Org-mode.
2021-03-07 16:14   ` org-in-org Greg Minshall
2021-03-07 22:26     ` Berry, Charles via General discussions about Org-mode. [this message]
2021-03-08  7:44       ` org-in-org Greg Minshall
2021-03-08 20:33         ` org-in-org Berry, Charles via General discussions about Org-mode.
2021-03-09  3:37           ` org-in-org Greg Minshall
2021-02-23 20:30 ` org-in-org Erik Iverson
2021-03-07 15:46   ` org-in-org Greg Minshall
2021-02-23 21:38 ` org-in-org Jeremie Juste
2021-03-07 16:06   ` org-in-org Greg Minshall

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=BA67E5F1-73D3-4E47-A8FA-0DBD4A035795@health.ucsd.edu \
    --to=emacs-orgmode@gnu.org \
    --cc=ccberry@health.ucsd.edu \
    --cc=minshall@umich.edu \


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