On Mon, 17 Nov 2014, iem...@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 via email to