emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [new exporter] Captions for tables made by source blocks
Date: Thu, 07 Mar 2013 21:48:17 +0100	[thread overview]
Message-ID: <87y5dzaqcu.fsf@gmail.com> (raw)
In-Reply-To: <87txoncg76.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 07 Mar 2013 17:44:45 +0100")

Hello,

Achim Gratz <Stromeko@nexgo.de> 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

  reply	other threads:[~2013-03-07 20:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  9:55 [new exporter] Captions for tables made by source blocks Vikas Rawal
2013-03-06 10:05 ` Nicolas Goaziou
2013-03-06 10:54   ` Vikas Rawal
2013-03-06 12:28     ` Nicolas Goaziou
2013-03-06 23:46       ` Vikas Rawal
2013-03-07  0:03         ` Andreas Leha
2013-03-07  1:52       ` Mike McLean
2013-03-07  8:20         ` Nicolas Goaziou
2013-03-07 12:27           ` Vikas Rawal
2013-03-07 12:42             ` Nicolas Goaziou
2013-03-07 13:41               ` Vikas Rawal
2013-03-07 15:02                 ` Eric S Fraga
2013-03-07 14:43               ` Vikas Rawal
2013-03-07 17:33                 ` Nicolas Goaziou
2013-03-07 23:38                   ` Vikas Rawal
2013-03-08  0:00                   ` Vikas Rawal
2013-03-07 16:44           ` Achim Gratz
2013-03-07 20:48             ` Nicolas Goaziou [this message]
2013-03-07 21:41               ` Achim Gratz
2013-03-08  8:21                 ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5dzaqcu.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).