[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Code block option :results raw does not replace #+RESULTS
From: |
Nick Dokos |
Subject: |
Re: [O] Code block option :results raw does not replace #+RESULTS |
Date: |
Fri, 31 Jan 2014 18:16:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Soapy Smith <address@hidden> 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