[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] odd behavior for begin_src org :results
From: |
Eric Schulte |
Subject: |
Re: [O] odd behavior for begin_src org :results |
Date: |
Wed, 01 May 2013 14:01:12 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Greg Minshall <address@hidden> writes:
> Org-mode version 8.0.1 (release_8.0.1-42-g267cbe @
> /Users/minshall/usr/share/emacs/site-lisp/org/)
>
> hi. the following produces #+RESULTS:
> ----
> #+begin_src org :results replace
> hello
> #+end_src
> ----
> but, repeated evaluations seem to grow the list of results. e.g., after
> four evaluations:
> ----
> #+RESULTS:
> hello
> hello
> hello
> hello
> ----
>
Yes, this is the behavior of raw results.
>
> the following does not produce #+RESULTS at all:
> ----
> #+begin_src org
> hello
> #+end_src
> ----
>
> is this intended behavior?
This is the intended behavior for Org-mode blocks, it is not the
intended behavior in general.
> the code thinks so; ob-org.el has:
> ----
> (defvar org-babel-default-header-args:org
> '((:results . "raw silent") (:exports . "code"))
> "Default arguments for evaluating a org source block.")
> ----
> otoh, the manual thinks ":results replace" should be the default:
> ----
> * 'replace' The default value. Any existing results will be removed,
> and the new results will be inserted into the Org mode buffer in
> their place. E.g., ':results output replace'.
> ----
>
In this case the defaults for org-mode are different from the general
cross-language defaults.
As I recall, at the time that the defaults were set for Org-mode code
blocks, we did not have options like drawers to allow replaceable raw
results. Perhaps the default header arguments for Org-mode should be
updated.
Best,
>
> cheers, Greg
>
--
Eric Schulte
http://cs.unm.edu/~eschulte