emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Possible to use src block to generate org headlines for export?


From: Andreas Leha
Subject: Re: [O] Possible to use src block to generate org headlines for export?
Date: Fri, 25 Jul 2014 14:39:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin)

Nicolas Goaziou <address@hidden> writes:

> Andreas Leha <address@hidden> writes:
>
>> Nicolas Goaziou <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]