From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Code block option :results raw does not replace #+RESULTS Date: Fri, 31 Jan 2014 18:16:42 -0500 Message-ID: <87bnyr91yd.fsf@alphaville.bos.redhat.com> References: <1391187052.2534.12.camel@raven-CM5571> <1391204719.2534.23.camel@raven-CM5571> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9NKY-0001SQ-Gg for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 18:17:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9NKQ-0002ML-Hx for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 18:17:02 -0500 Received: from plane.gmane.org ([80.91.229.3]:41542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9NKQ-0002MD-Bz for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 18:16:54 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W9NKO-0005X7-Jh for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 00:16:52 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Feb 2014 00:16:52 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Feb 2014 00:16:52 +0100 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 Soapy Smith writes: > Hello- > > Here is an example Python code block: > > #+begin_src python :results value raw > a = (1, 2, 3, 4) > return a > #+end_src > > #+RESULTS: > (1, 2, 3, 4) > (1, 2, 3, 4) > > The #+RESULT block above is after 2 evaluations. > The default behavior of "replace" is not happening. The result "stack" > will continue to grow with additional evaluations. > > I also confirmed the same behavior with a Clojure code block. > > Is this the expected behavior for this option? > Yes - raw does not keep track of where the results begin and end and cannot erase the old ones before adding the new ones. Try calling org-babel-remove-result: you'll see that it gets rid of the #+RESULTS: line but it doesn't touch the actual results. Once it has inserted them, they become part of the buffer, outside the jurisdiction of the code block/babel. Nick