From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: [babel] Purpose of :results raw Date: Sat, 20 Apr 2013 16:34:35 -0500 Message-ID: References: <86txn2i312.fsf@somewhere.org> <878v4ep362.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTfQr-000211-St for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 17:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTfQq-0000Db-4V for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 17:34:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:53669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTfQp-0000DM-RM for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 17:34:52 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UTfQh-0006bx-Ly for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 23:34:43 +0200 In-Reply-To: <878v4ep362.fsf@gmail.com> 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: Nicolas Goaziou Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org, Sebastien Vauban On Fri, Apr 19, 2013 at 5:27 PM, Nicolas Goaziou wrote: > > > Hello, > > "Sebastien Vauban" > 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/emacs-orgmode@gnu.org/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 > >