[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] Purpose of :results raw
From: |
John Hendy |
Subject: |
Re: [O] [babel] Purpose of :results raw |
Date: |
Sat, 20 Apr 2013 16:34:35 -0500 |
On Fri, Apr 19, 2013 at 5:27 PM, Nicolas Goaziou <address@hidden> wrote:
>
>
> Hello,
>
> "Sebastien Vauban"
> <address@hidden> writes:
>
>> Now that ":results drawer" has been introduced, I wonder why we still have
>> ":results raw".
>>
>> As once stated in this ML:
>>
>> The sole purpose of raw results is to allow inserting an headline (I
>> mean
>> a real headline, not comma protected) in the buffer, because headlines
>> cannot be contained in anything else than headlines.
>>
>> But drawer does the same.
>
> What makes you think drawers do the same? Drawers cannot contain
> headlines.
>
But back to the original question, what does =:results raw=
accomplish? From my view, even if they *can* contain headlines, they
get exported twice, and re-running the code block just adds duplicate
output to whatever was already there. Consider this test file:
#+begin_src orgmode
* Heading
#+begin_src R :session r :results output raw :exports results
cat("* Heading2\n")
cat("This is some test text\n")
#+end_src
#+RESULTS:
* Heading2
This is some test text
#+begin_src R :session r :results output drawer :exports results
cat("* Heading3\n")
cat("This is some test text\n")
#+end_src
#+RESULTS:
:RESULTS:
* Heading3
This is some test text
:END:
* Heading 4
#+begin_src R :session r :results output drawer :exports results
cat("This is some test text\n")
#+end_src
#+RESULTS:
:RESULTS:
This is some test text
:END:
#+end_src
"** Heading2" gets exported twice, and the :RESULTS: and :END: drawer
property indicators are also being exported. Yes, I can delete the
=:results raw= output, but that's time consuming, especially as one
tweaks code and re-evaluates to check the results. One has to do this
every time not to flood the document with duplicate results.
See Eric Schulte's response here:
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01224.html
I was getting multiple instance with =:results output raw= and was
instructed to use =:results output org= for the very reason that it
would be able to discern the output and replace it upon subsequent
block evaluations.
Now consider this recent thread:
- http://www.mail-archive.com/address@hidden/msg70016.html
The gist of that long discussion is that =:results output org= was
replaced by =:results output drawer=, but it seems we haven't
recreated all of the existing functionality. There's another thread
out there in which for a while it was to be =:results output wrap=
and/or =:wrap org= in order to do something like this (output actual
Org-mode syntax from a code block and have it exported as if it was
actually written in the document).
There are instances where I'd like to generate numerous plots and then
create subheadings for the various iterations of my loops, so having
the ability to actual print "** Subheading" to a results block and
have it exported would be useful. Seems that =:results raw= is now the
only way to do that, and export only works if you delete whatever
results are down there already prior to doing so.
Let me know if there's another/better way.
Thanks,
John
>
> Regards,
>
> --
> Nicolas Goaziou
>
>