Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Andreas Leha <andreas.l...@med.uni-goettingen.de> writes:
>
>> Nicolas Goaziou <m...@nicolasgoaziou.fr> 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