From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Possible to use src block to generate org headlines for export? Date: Fri, 25 Jul 2014 14:39:15 +0100 Message-ID: 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]:34902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAfij-0004cl-Bs for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 09:39:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAfie-0005UM-0i for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 09:39:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:34949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAfid-0005UG-QE for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 09:39:31 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XAfic-0001cs-Tw for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 15:39:30 +0200 Received: from 193.63.222.28 ([193.63.222.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Jul 2014 15:39:30 +0200 Received: from andreas.leha by 193.63.222.28 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Jul 2014 15:39:30 +0200 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Andreas Leha writes: > >> Nicolas Goaziou writes: > >>> No matter how special the results drawer is, it cannot (and shouldn't) >>> contain headlines. >> >> You are the master of the parser... > > That's why I carefully avoid shooting myself in the foot. There is (at > least) a good reason why only headlines can contain headlines, which is > speed, as a consequence of CFG. > >> IIUC, you are saying that raw+replace is possible right now for any >> content in the results (other than headlines), if the results are in a >> drawer? > > If the results are in a drawer, this is not "raw" anymore, but "drawer". > Anyway you can put anything in your drawer besides a headline and > another drawer. 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 > >> Then, my follow-up question is simply, why are drawers not the default >> for results, then? Is there any drawback (apart from an additional >> line)? > > The block may insert a headline, or another drawer, within the results > drawer, thus breaking the document. > I understand that. Will update my local 'defaults' then to drawer. Regards, Andreas