Re: [O] 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/)]

2016-04-03 Thread Nicolas Goaziou
Hello,

Shlomi Vaknin  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



[O] 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/)]

2016-03-28 Thread Shlomi Vaknin
Hey,
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? ;)

Thanks,
Shlomi

Emacs  : GNU Emacs 25.1.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
Version 10.9.5 (Build 13F1603))
 of 2016-03-17
Package: Org-mode version 8.3.4 (release_8.3.4-686-g18b766 @
~/org-mode/org-mode/lisp/)