emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: iemacs@gmail.com
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: #+CALL get the first row of output table lost when using latex export
Date: Mon, 17 Nov 2014 08:08:47 -0800	[thread overview]
Message-ID: <alpine.OSX.2.00.1411170748170.425@charles-berrys-macbook.local> (raw)
In-Reply-To: <CALeUZPeh+5D3_XpMocoijyA-u0KQ=eE4TNNCJn7jmdL8wmAYwQ@mail.gmail.com>

On Mon, 17 Nov 2014, iemacs@gmail.com wrote:

> Thank you, Charles.  And =:colnames yes= does work here.  But the
> results are the same when I evaluate t1 and t2 with
> `org-babel-execute-maybe'.
>
> When I take another try, new problem seems to occur.
>
> The test file is:
> #+BEGIN_EXAMPLE
> #+NAME: t1
> #+BEGIN_SRC python :exports results
>  return [['A'],None,[2],None,[3]]
> #+END_SRC
>
> #+CAPTION: T1
> #+RESULTS: t1
>
> #+NAME: t2
> #+CALL: t1() :exports results
>
> #+CAPTION: T2
> #+RESULTS: t2
> #+END_EXAMPLE
>
> The results of `org-babel-execute-maybe' on t1 and t2 are identical:
> #+BEGIN_SRC org
>  | A |
>  |---|
>  | 2 |
>  |---|
>  | 3 |
> #+END_SRC

Not in my world (unless you add `:hlines').

,----
| #+NAME: t1
| #+BEGIN_SRC python :exports results
|   return [['A'],None,[2],None,[3]]
| #+END_SRC
|
| #+CAPTION: T1
| #+RESULTS: t1
| | A |
| |---|
| | 2 |
| |---|
| | 3 |
|
| #+NAME: t2
| #+CALL: t1() :exports results
|
| #+CAPTION: T2
| #+RESULTS: t2
| | A |
| | 2 |
| | 3 |
`----


ob-python.el seems to be doing its own thing here.

What you see in the second instance is the usual Babel output for a table.

In my view this is a bug in ob-python.el.

See: (info "(org) hlines") for the proper idiom.

HTH,

Chuck

  reply	other threads:[~2014-11-17 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-15 15:34 #+CALL get the first row of output table lost when using latex export iemacs
2014-11-16 18:37 ` Charles Berry
2014-11-17 14:43   ` iemacs
2014-11-17 16:08     ` Charles C. Berry [this message]
2014-11-19 14:48       ` iemacs

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=alpine.OSX.2.00.1411170748170.425@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=iemacs@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).