From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: exporting cross-references to source block results CORRECTION Date: Thu, 11 Apr 2013 16:30:08 +0200 Message-ID: <87zjx5qgwf.fsf@gmail.com> References: <20130411084634.GA10767@panahar> <20130411095747.GC18521@panahar> <20130411104605.GA28852@panahar> <874nfds2e0.fsf@gmail.com> <20130411121841.GA30711@panahar> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQIW2-0002uS-Ey for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 10:30:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQIVx-0006ZA-Nj for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 10:30:18 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:52166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQIVx-0006Yt-Hf for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 10:30:13 -0400 Received: by mail-wi0-f175.google.com with SMTP id c10so625671wiw.2 for ; Thu, 11 Apr 2013 07:30:12 -0700 (PDT) In-Reply-To: <20130411121841.GA30711@panahar> (Vikas Rawal's message of "Thu, 11 Apr 2013 17:48:41 +0530") 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: Christian Moe Cc: emacs-orgmode Vikas Rawal 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