emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Torsten Wagner <torsten.wagner@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: [babel] Problems assigning tables as variables using #+CALL and using properties in code blocks and sbe calls
Date: Fri, 19 Jul 2013 02:34:20 +0200	[thread overview]
Message-ID: <CAPaq-gNyv=JtKvkwi-YCB0w+-2AAyE0Mr6qZo-P2ZEZa8ORj5Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

Hi,
I have a tables like this:

#+TBLNAME: tablename
| a | b |c | d |
| 1 | 2 |3  |4 |
| z | x | y |w|

#+TBLNAME: othertablename
| a | b |c | d |
| 1 | 2 |3  |4 |
| z | x | y |w|

I have the following code block

#+name: test
#+begin_src python :var table=tablename :exports results
import numpy as np
tab = np.array(table)
return np.array([tab[:,1], tab[:,-1]]).T
#+end_src

If I call that function the result is correct

However using

#+CALL: aushang[:var table=othertablename]() :exports results
or
#+CALL: aushang(table=othertablename) :exports results

does not work. It seem the babel block does not get the table but something
else in case its called by #+CALL:.
In general, how-to refer to a table in #+CALL blocks?

On a similar line: I used $PROP_name to use property values within the sbe
function.
However, how to use the same property as input to a code-block?

+begin_src python :var x=$PROP_name :exports results
and
+begin_src python :var x=name :exports results

did not work

Any ideas?

Thanks

Torsten

[-- Attachment #2: Type: text/html, Size: 1419 bytes --]

             reply	other threads:[~2013-07-19  0:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  0:34 Torsten Wagner [this message]
2013-07-19  1:06 ` [babel] Problems assigning tables as variables using #+CALL and using properties in code blocks and sbe calls Eric Schulte
2013-07-19 11:06   ` Torsten Wagner
2013-07-19 15:57     ` Torsten Wagner
2013-07-19 17:56       ` Rick Frankel

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='CAPaq-gNyv=JtKvkwi-YCB0w+-2AAyE0Mr6qZo-P2ZEZa8ORj5Q@mail.gmail.com' \
    --to=torsten.wagner@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).