From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Org Babel resolution of `:var` value reference inconsistent Date: Wed, 04 Nov 2015 12:14:02 +0000 Message-ID: References: <8737woetng.fsf@toshiba.i-did-not-set--mail-host-address--so-tickle-me> <874mh48roq.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ztx3z-0006YJ-1w for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 07:22:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtwxG-0000s2-Pg for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 07:16:15 -0500 Received: from plane.gmane.org ([80.91.229.3]:36822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtwxG-0000rs-EP for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 07:14:18 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZtwxC-0008Hr-A3 for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 13:14:14 +0100 Received: from 193.63.223.232 ([193.63.223.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2015 13:14:14 +0100 Received: from andreas.leha by 193.63.223.232 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2015 13:14:14 +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: emacs-orgmode@gnu.org Hi Nick, Nick Dokos writes: > Andreas Leha writes: > >> ... >> So, to me it is more surprising that the manual execution works. For >> instance, I might have two tables with the same name. Then, COMMENTing >> one of them should ensure that the other one is used. >> > > COMMENT works during export *only* I believe. You have to explicitly > comment out one of the tables otherwise. If there are two tables with > the same name, babel will use the one nearer the beginning of the file > and ignore the second one (I determined this experimentally, *not* by > reading and understanding the code - ymmv). Thanks for following up on this. I also ran some tests now and confirm what you see. Test code below [2]. I'd say it is a bug if the results from evaluation differ between manual evaluation and during export. And even if it is not explicitely contradicting the manual [1] (which does not say anything about finding references), I'd prefer if references in COMMENT'ed sections are not found -- neither during export nor during evaluation. This would be more inline with my intuition of COMMENT is equivalent to # (which is also suggested by the fact that COMMENT is described in the section on #). Regards, Andreas [1] http://orgmode.org/manual/Comment-lines.html#Comment-lines [2] Test code --8<---------------cut here---------------start------------->8--- * Test COMMENTing babel reference ** COMMENT Table 1 #+name: testtable | a | b | |---+---| | 1 | 2 | # ** Table 2 # #+name: testtable # | c | d | # |---+---| # | 3 | 4 | # ** Table 2.5 # #+name: testtable2 # | c | d | # |---+---| # | 3 | 4 | ** Table 3 #+name: testtable | e | f | |---+---| | 5 | 6 | ** Use (one of) the visible tables This gives different results during export compared to manual evaluation. #+begin_src R :var tab=testtable :colnames yes :exports results tab #+end_src #+results: | a | b | |---+---| | 1 | 2 | ** Use the #'ed table :noexport: This works neither during export nor during manual evaluation. #+begin_src R :var tab=testtable2 :colnames yes :exports results tab #+end_src --8<---------------cut here---------------end--------------->8---