From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Possible to use src block to generate org headlines for export? Date: Fri, 25 Jul 2014 18:08:24 +0200 Message-ID: <87r419ju9z.fsf@nicolasgoaziou.fr> References: <87zjg1gddd.fsf@fastmail.fm> <87wqb4amqb.fsf@gmail.com> <8738dshkdw.fsf@fastmail.fm> <8761io2jnz.fsf@fastmail.fm> <87ha27a5ip.fsf@gmail.com> <87ppgtltzj.fsf@nicolasgoaziou.fr> <87zjfxk1wb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAi2A-00065g-SF for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAi23-0001n1-4V for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:07:50 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:51233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAi22-0001mu-UG for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 12:07:43 -0400 In-Reply-To: (Andreas Leha's message of "Fri, 25 Jul 2014 14:39:15 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org Andreas Leha writes: > But then, I do not understand your statement 'headlines are the only > limitation to raw+replace behaviour'. > > This code block does not seem to respect 'raw+replace' for me: > > #+name: dtrn > #+BEGIN_SRC R :results raw replace > nwords <- 500 > nletters <- sapply(1:nwords, function(i) sample(1:10, 1)) > words <- sapply(nletters, function(i) paste(sample(letters, i), collapse="")) > words[sample(nwords, 100)] <- "\n" > paste(words, collapse=" ") > #+END_SRC That was not clear, indeed. "raw" behaviour is only "useful" (i.e., mandatory) when you want to insert a headline (or a drawer) as a result of a code block evaluation. But then, you lose the ability to replace results. That's the limitation I'm talking about. In any other case, "drawer+replace" is the superior choice. Regards, -- Nicolas Goaziou