emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: Torsten Wagner <torsten.wagner@gmail.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>,
	Eric Schulte <schulte.eric@gmail.com>
Subject: Re: [babel] Problems assigning tables as variables using #+CALL and using properties in code blocks and sbe calls
Date: Fri, 19 Jul 2013 13:56:53 -0400	[thread overview]
Message-ID: <662b2ff54a06a6fd83efd44979094d91@mail.rickster.com> (raw)
In-Reply-To: <CAPaq-gOzuqOzLm1xf0w+c85onGQH2mb467e8U1f4uRfu_a+OYg@mail.gmail.com>

On 2013-07-19 11:57, Torsten Wagner wrote:
> Hi Eric,
> 
> one mini-step forward.
> The #+CALL function does not work if the table has a horizontal line 
> like in
> #+TBLNAME: othertablename
> | a | b | c | d |
> |---+---+---+---|
> | 4 | 3 | 2 | 1 |
> | z | x | y | w |
> 
> however, it works for
> 
> #+TBLNAME: othertablename
> | a | b | c | d |
> | 4 | 3 | 2 | 1 |
> | z | x | y | w |
> 
> I guess we come closer to the problem ;)
> 

This is, i believe related to the general problems I have been seeing
with the processing of tables passed as arguments to babel blocks vs.
the same tables passed to `call' lines. For example:

#+BEGIN_ORG
#+name: ptable
| head1 | head2 |
|-------+-------|
| a     |     1 |
| b     |     2 |

#+name: ptable-mirror
#+BEGIN_SRC python :var t=ptable :results value :colnames no
	return t
#+END_SRC

#+RESULTS: ptable-mirror
| head1 | head2 |
| a     |     1 |
| b     |     2 |

#+call: ptable-mirror()

#+RESULTS:
| head1 | head2 |
| a     |     1 |
| b     |     2 |

#+call: ptable-mirror(t=ptable)

#+RESULTS:
| head1 | head2 |
|-------+-------|
| a     |     1 |
| b     |     2 |
#+END_ORG

As you can see, the handling of headers/colnames is different in a
`call' depending on if the argument is specified explicitly or not.

BTW, changing `colnames no' to `:colnames yes' results in:

#+BEGIN_ORG
#+call: ptable-mirror(t=ptable)

#+RESULTS:
| head1 | head2 |
|-------+-------|
| head1 | head2 |
|-------+-------|
| a     |     1 |
| b     |     2 |
#+END_ORG

rick

      reply	other threads:[~2013-07-19 17:56 UTC|newest]

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

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=662b2ff54a06a6fd83efd44979094d91@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    --cc=torsten.wagner@gmail.com \
    /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).