emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to pass named table reference in source block variable


From: Thorsten Jolitz
Subject: Re: [O] How to pass named table reference in source block variable
Date: Wed, 07 Aug 2013 00:22:25 +0200
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

Roland Donat <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]