[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Creating new org headers from code blocks
From: |
Rainer M Krug |
Subject: |
[O] Creating new org headers from code blocks |
Date: |
Fri, 19 Sep 2014 12:04:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
Hi
I have some R code which generates several graphics. I would now like to
generate in R text which is then interpreted by org, upon export, as
normal org code. Furthermore, I would like to create new org headers from
the R code. Imagine I have the R code block below. Executed, I get the
results below:
--8<---------------cut here---------------start------------->8---
* Some code block
#+begin_src R :results raw :wrap :exports both
c("** New header", "[[./graph1.pdf]]", "", "** and second header", "and some
text" )
#+end_src
#+RESULTS:
#+BEGIN_RESULTS
,** New header
[[./graph1.pdf]]
,** and second header
and some text
#+END_RESULTS
--8<---------------cut here---------------end--------------->8---
I can leave the :wrap, but then the results are not overwritten, but
appended - otherwise it works as expected.
How can I achieve that I get
,----
| ** New header
| [[./graph1.pdf]]
|
| ** and second header
| and some text
`----
in the org file, but also that the result gets overwritten upon repeated
execution?
Thanks,
Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
pgp4ZWMiey_fD.pgp
Description: PGP signature
- [O] Creating new org headers from code blocks,
Rainer M Krug <=