From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] Replace results with ascii package caption Date: Mon, 05 Mar 2012 10:03:41 -0700 Message-ID: <87linfask2.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4bKD-0001J1-1a for emacs-orgmode@gnu.org; Mon, 05 Mar 2012 12:03:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4bK5-0002Js-TV for emacs-orgmode@gnu.org; Mon, 05 Mar 2012 12:03:52 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:43415) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S4bK5-0002Jg-No for emacs-orgmode@gnu.org; Mon, 05 Mar 2012 12:03:45 -0500 In-Reply-To: (Thomas S. Dye's message of "Mon, 05 Mar 2012 06:48:10 -1000") 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org 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, tsd@tsdye.com (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/