From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Christian Moe <mail@christianmoe.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: exporting cross-references to source block results CORRECTION
Date: Thu, 11 Apr 2013 16:30:08 +0200 [thread overview]
Message-ID: <87zjx5qgwf.fsf@gmail.com> (raw)
In-Reply-To: <20130411121841.GA30711@panahar> (Vikas Rawal's message of "Thu, 11 Apr 2013 17:48:41 +0530")
Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>> > cross-reference will pick that up correctly.
>> >
>> > If #+RESULT is not to work, it is better to change
>> > org-babel-results-keyword to NAME, and then what you are suggesting
>> > happens automatically. But in the earlier thread on the topic, Nicolas
>> > said that was not the right way.
>>
>> We are misunderstanding each other.
>>
>> #+results are never used for cross-references. This is a Babel internal
>> keyword used to refer to the source that generated this element.
>>
>> Cross-references only react to #+name keyword.
>>
>
>
> Sorry, this is confusing. Is it then the case that we are naming the
> source block to ensure that captions stick to the corresponding
> results block?
Source block captions apply to the source block, not to the results. You
have to define a separate caption for the results.
Source block name will be used both as a label for cross referencing and
as a Babel internal code for results correspondence.
> And then, we need to separately name the results block, and use
> a different name for it, so that the cross-references pick it up
> correctly?
Yes, the name given to the results block doesn't depend on the results
keyword. You can give it any name, as long as it is unique.
Here is an example:
#+caption: Src block caption
#+name: my-src
#+begin_src emacs-lisp
(+ 1 2)
#+end_src
#+name: anything
#+caption: Element caption
#+results: my-src
: 3
As far as affiliated keywords go, the only one you needn't provide is
"#+results:".
HTH,
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-04-11 14:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 8:46 exporting cross-references to source block results Vikas Rawal
2013-04-11 9:42 ` Christian Moe
2013-04-11 9:57 ` Vikas Rawal
2013-04-11 10:37 ` exporting cross-references to source block results CORRECTION Christian Moe
2013-04-11 10:46 ` Vikas Rawal
2013-04-11 11:31 ` Christian Moe
2013-04-11 12:00 ` Nicolas Goaziou
2013-04-11 12:18 ` Vikas Rawal
2013-04-11 14:30 ` Nicolas Goaziou [this message]
2013-04-11 15:24 ` Vikas Rawal
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=87zjx5qgwf.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@christianmoe.com \
/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).