From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: How to pass named table reference in source block variable Date: Wed, 07 Aug 2013 00:22:25 +0200 Message-ID: <87mwou1mu6.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6peP-0000cQ-PI for emacs-orgmode@gnu.org; Tue, 06 Aug 2013 18:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6peI-0003up-Fi for emacs-orgmode@gnu.org; Tue, 06 Aug 2013 18:22:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:42920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6peI-0003uk-9J for emacs-orgmode@gnu.org; Tue, 06 Aug 2013 18:22:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V6peH-0005aO-15 for emacs-orgmode@gnu.org; Wed, 07 Aug 2013 00:22:37 +0200 Received: from g231234121.adsl.alicedsl.de ([92.231.234.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Aug 2013 00:22:37 +0200 Received: from tjolitz by g231234121.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Aug 2013 00:22:37 +0200 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 Roland Donat writes: > Hello, > > I have the following table : > #+TBLNAME: T > | | x | 1 | > | ^ | | varx | > > And I would like to use the reference T$var_x (=1) as input in a source block > variable. > For example, I would have expected the following behavior for this source > code : > #+begin_src python :var x=T$varx :return x > x > #+end_src > > #+RESULTS: > : 1 > > But instead, I get the emacs message : org-babel-ref-resolve: Reference > 'T$varx' not found in this > buffer > > Any idea to produce the desired result would be much appreciated! > > Thanks you in advance. > > Roland. This does the job in Emacs Lisp: #+TBLNAME: T | | x | 1 | | ^ | | varx | #+begin_src emacs-lisp :var x=T[0,-1] x #+end_src #+results: : 1 -- cheers, Thorsten