emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [babel] Replace results with ascii package caption


From: Eric Schulte
Subject: Re: [O] [babel] Replace results with ascii package caption
Date: Mon, 05 Mar 2012 10:03:41 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Would it be possible to swap the results and caption lines?

e.g., this

> #+RESULTS: test-replace-results
> #+CAPTION: Test replace results
> | 0%   | 25%  | 50%  | 75%  | 100% |
> |------+------+------+------+------|
> | 0.02 | 0.28 | 0.49 | 0.78 | 0.98 |

to this

> #+CAPTION: Test replace results
> #+RESULTS: test-replace-results
> | 0%   | 25%  | 50%  | 75%  | 100% |
> |------+------+------+------+------|
> | 0.02 | 0.28 | 0.49 | 0.78 | 0.98 |

everything following #+results is expected to be part of the results,
and it would be simpler to not add special cases to this behavior for
lines that look like Org-mode comment constructs.

Best,

address@hidden (Thomas S. Dye) writes:

> Aloha all,
>
> The code block at the bottom appends its results, rather than replacing
> them.  Here are the header arguments:
>
> Name: test-replace-results
> Lang: R
> Header Arguments:
>       :cache          no
>       :exports        code
>       :hlines         no
>       :noweb          yes
>       :padnewline     yes
>       :results        raw output replace
>       :session        none
>       :tangle         no
>
> Everything works fine without the ascii package caption argument.
>  
> * Babel replace results
> #+name: test-replace-results
> #+header: :results output raw
> #+BEGIN_SRC R
> library(ascii)
> cap <- "Test replace results"
> x <- runif(100)
> y <- ascii(quantile(x),include.colnames=T,header=T,caption=cap)
> print(y,type="org")
> rm(cap,x,y)
> #+END_SRC
> #+RESULTS: test-replace-results
> #+CAPTION: Test replace results
> | 0%   | 25%  | 50%  | 75%  | 100% |
> |------+------+------+------+------|
> | 0.02 | 0.28 | 0.49 | 0.78 | 0.98 |
> #+CAPTION: Test replace results
> | 0%   | 25%  | 50%  | 75%  | 100% |
> |------+------+------+------+------|
> | 0.01 | 0.21 | 0.44 | 0.76 | 1.00 |
>
> I'm using Org-mode version 7.8.03 (release_7.8.03.546.gf6ea).
>
> All the best,
> Tom

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]