emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: emacs-orgmode@gnu.org
Subject: Creating new org headers from code blocks
Date: Fri, 19 Sep 2014 12:04:38 +0200	[thread overview]
Message-ID: <m21tr8j58p.fsf@krugs.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

             reply	other threads:[~2014-09-19 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 10:04 Rainer M Krug [this message]
2014-09-19 11:45 ` Creating new org headers from code blocks Thorsten Jolitz
2014-09-19 12:15   ` Rainer M Krug
2014-09-19 12:43     ` Thorsten Jolitz
2014-09-19 12:55       ` Rainer M Krug
2014-09-19 13:32         ` Thorsten Jolitz
2014-09-19 13:40           ` Rainer M Krug

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=m21tr8j58p.fsf@krugs.de \
    --to=rainer@krugs.de \
    --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).