emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Shlomi Vaknin <shlomivaknin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Using CALL to evaluate elisp blocks does not show table headers [8.3.4 (release_8.3.4-686-g18b766 @ ~/org-mode/org-mode/lisp/)]
Date: Sun, 03 Apr 2016 10:57:08 +0200	[thread overview]
Message-ID: <87pou7134r.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CANyzh=hass3Qow_zP0o3Rz7iuJ3Cf8hZhk8FZnTz4B1LGmDpww@mail.gmail.com> (Shlomi Vaknin's message of "Mon, 28 Mar 2016 16:55:24 -0700")

Hello,

Shlomi Vaknin <shlomivaknin@gmail.com> writes:

> I have an elisp source block that builds a table from some computation.
> When trying to #+CALL that block, the table header (before the 'hline) is
> simply not shown. Here is a simple reproduce on my system:
>
> ----------------------------------------------
> #+name: test
> #+BEGIN_SRC elisp
> (list (list 'a 'b 'c 'd) 'hline (list 1 2 3 4) (list 3 4 5 6))
> #+END_SRC
>
> #+RESULTS: test
> | a | b | c | d |
> |---+---+---+---| 1 | 2 | 3 | 4 | 3 | 4 | 5 | 6 |
>
>
> #+CALL: test()
> #+RESULTS:
> | 1 | 2 | 3 | 4 | 3 | 4 | 5 | 6 |
>
> #+CALL: test() :results raw
> #+RESULTS:
> ((1 2 3 4) (3 4 5 6))
> ----------------------------------------------
>
> What am I doing wrong? ;)

Nothing.

Actually, CALL lines do not work as one would expect.

At first, the CALL line evaluates the called block with the provided
arguments and stores the result. So far so good. But then, it evaluates
the result as emacs-lisp data. So the final output inherits all the
idiosyncrasies from Babel Emacs lisp. E.g., quoting the manual (info
"(org) rownames"),

  Note that Emacs Lisp code blocks ignore the ‘:rownames’ header
  argument entirely given the ease with which tables with row names may
  be handled directly in Emacs Lisp.

Unless I'm missing something obvious, the last step of the process
should be omitted. I will look into it in the next days.

Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2016-04-03  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-28 23:55 Bug: Using CALL to evaluate elisp blocks does not show table headers [8.3.4 (release_8.3.4-686-g18b766 @ ~/org-mode/org-mode/lisp/)] Shlomi Vaknin
2016-04-03  8:57 ` Nicolas Goaziou [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=87pou7134r.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=shlomivaknin@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).