From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [new exporter] Captions for tables made by source blocks Date: Thu, 07 Mar 2013 21:48:17 +0100 Message-ID: <87y5dzaqcu.fsf@gmail.com> References: <20130306095512.GA1489@panahar> <87k3pk268w.fsf@gmail.com> <20130306105410.GA8157@panahar> <87zjygzp9g.fsf@gmail.com> <87sj47d3jf.fsf@gmail.com> <87txoncg76.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhjr-0007c7-8d for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 15:48:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDhjp-000057-MK for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 15:48:31 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:53633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhjp-00004z-Fz for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 15:48:29 -0500 Received: by mail-wg0-f51.google.com with SMTP id 8so1654871wgl.6 for ; Thu, 07 Mar 2013 12:48:28 -0800 (PST) In-Reply-To: <87txoncg76.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 07 Mar 2013 17:44:45 +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: Achim Gratz Cc: emacs-orgmode@gnu.org Hello, Achim Gratz writes: > Nicolas Goaziou writes: >> For the same reason, caption here applies to the dynamic block, not to >> its contents. > > This seems to be a common enough mistake and it is currently impossible > to put captions and other arguments on results blocks save with yet > another source block that produces the correct org code (well you can > put the headers there after the result has been generated, but then you > have to delete all that stuff before generating a new result). It's very easy to have a caption on the generated output: name the code. Hence, the following code block: #+NAME: calculation #+BEGIN_SRC emacs-lisp (+ 1 1) #+END_SRC will produce: #+RESULTS: calculation 2 If you add a caption to the results, like: #+CAPTION: Basic arithmetic #+RESULTS: calculation 2 you can update the source block without ever needing to remove the caption. At some point, it would be nice if Babel could find captioned anonymous results (so you wouldn't even have to name the block). I'll have a look at it. But meanwhile, this solution is sufficient. Regards, -- Nicolas Goaziou