emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Christopher W. Ryan" <cryan@binghamton.edu>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: trouble exporting just one subtree while using babel and R code blocks--spoke too soon
Date: Wed, 06 Mar 2013 14:51:42 -0500	[thread overview]
Message-ID: <51379E4E.6020603@binghamton.edu> (raw)
In-Reply-To: <CA+M2ft8eyEn4pOWw9xe09qaXYPfzkF-8VdnJqkw8yG4prwmPUw@mail.gmail.com>

Well, with the little test file I initially posted, things worked OK
with org version 7.9.3f.  But things are bit more complicated:

-----------------------------------

* goodbye

foo foo

* Hello
:PROPERTIES:
:EXPORT_FILE_NAME: TestMyBabelSetup
:EXPORT_TITLE: foobar
:EXPORT_AUTHOR: Christopher W. Ryan, MD MS
:RESULTS: output
:EXPORTS: both
:END:

** Big foo

foo

#+begin_src R
rnorm(3)
#+end_src

-----------------------------------

Put cursor on
* Hello
above and then C-c C-e 1 d
The resulting pdf file does not show the results of the R code, only the
verbatim code itself.

Remove the line
** Big foo

Then put cursor on * Hello above and then C-c C-e 1 d
org/babel then asks if I want to execute the R code. Answer yes.
A pdf file will open showing the R code and the results.

I don't understand.

--Chris

Christopher W. Ryan, MD, MS
SUNY Upstate Medical University Clinical Campus at Binghamton
425 Robinson Street, Binghamton, NY  13904
cryanatbinghamtondotedu

"Once we recognize that we do not err out of laziness, stupidity, or
evil intent, we can liberate ourselves from the impossible burden of
trying to be permanently right. We can take seriously the proposition
that we could be in error, without deeming ourselves idiotic or
unworthy." [Karen Schulz, in Being Wrong: Adventures in the Margin of Error]


John Hendy wrote:
> On Mon, Feb 18, 2013 at 3:10 PM, Christopher W. Ryan
> <cryan@binghamton.edu> wrote:
>> I have a long cumulative org file that contains work related to a series
>> of studies. Each first-level subtree (*) is a new study. I need to be
>> able to export any given first-level tree on its own, with an output pdf
>> file name different from the main org filename, and with a title perhaps
>> different from the * headline. And I need to execute R code as it
>> exports. I am running org-mode 7.7 on Windows XP
>>
>> A sample org file to illustrate the problem looks like this:
>>
>> ------------------------------------------
>>
>> * goodbye
>>
>> foo foo
>>
>> * Hello
>> :PROPERTIES:
>> :EXPORT_FILE_NAME: TestMyBabelSetup
>> :EXPORT_TITLE: foobar
>> :EXPORT_AUTHOR: Christopher W. Ryan, MD MS
>> :RESULTS: output
>> :EXPORTS: both
>> :END:
>>
>> foo
>>
>> #+begin_src R
>> rnorm(3)
>> #+end_src
>>
>>
>> --------------------------------------------
>>
>> When I export the whole file to pdf, everything works fine.
>>
>> But if I try to export just the * Hello tree, then I get an error:
>>
>>  Args out of range: "", -1, 0
> 
> I can't reproduce. =M-x org-version= is Org-mode version 7.9.3e
> (7.9.3e-910-g33c4f6)
> 
> Can you try updating your orgmode version?
> 
> I attached the results of =C-c C-e 1 p= (export subtree) with the
> cursor within the * Hello headline contents.
> 
> 
> Best regards,
> John
> 
>>
>> If I remove anything relating to R and babel from the * Hello tree,
>> leaving just this:
>>
>> -----------------------------------------------
>> * goodbye
>>
>> foo foo
>>
>> * Hello
>> :PROPERTIES:
>> :EXPORT_FILE_NAME: TestMyBabelSetup
>> :EXPORT_TITLE: foobar
>> :EXPORT_AUTHOR: Christopher W. Ryan, MD MS
>> :END:
>>
>> foo
>>
>> -------------------------------------------------
>>
>> then exporting just the * Hello treee works as expected.
>>
>> I'm stumped. What am I doing wrong?
>>
>> Thanks.
>>
>> --Chris
>> --
>> Christopher W. Ryan, MD, MS
>> SUNY Upstate Medical University Clinical Campus at Binghamton
>> 425 Robinson Street, Binghamton, NY  13904
>> cryanatbinghamtondotedu
>>
>> "Once we recognize that we do not err out of laziness, stupidity, or
>> evil intent, we can liberate ourselves from the impossible burden of
>> trying to be permanently right. We can take seriously the proposition
>> that we could be in error, without deeming ourselves idiotic or
>> unworthy." [Karen Schulz, in Being Wrong: Adventures in the Margin of Error]
>>
>>

  parent reply	other threads:[~2013-03-06 19:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 21:10 trouble exporting just one subtree while using babel and R code blocks Christopher W. Ryan
2013-02-18 21:22 ` John Hendy
2013-03-06 19:33   ` Christopher W. Ryan
2013-03-06 21:28     ` John Hendy
2013-03-06 19:51   ` Christopher W. Ryan [this message]
2013-03-07  8:42     ` trouble exporting just one subtree while using babel and R code blocks--spoke too soon Eric S Fraga
2013-03-07 13:13       ` Christopher W Ryan
2013-03-07 14:36         ` Eric S Fraga
2013-03-07 17:55           ` Achim Gratz
2013-03-08  7:54             ` Bastien
2013-03-08 16:51               ` Achim Gratz
2013-03-08 17:25                 ` Bastien
2013-03-08 19:48                   ` Achim Gratz
2013-03-09  9:26                     ` Bastien
2013-03-11 13:47           ` Christopher W. Ryan
2013-03-07 15:00         ` John Hendy
2013-03-07 15:54           ` Christopher W Ryan
2013-03-07 16:12             ` John Hendy

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=51379E4E.6020603@binghamton.edu \
    --to=cryan@binghamton.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \
    /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).