From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: Re: #+CALL get the first row of output table lost when using latex export Date: Wed, 19 Nov 2014 09:48:51 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr6Z0-00067F-MF for emacs-orgmode@gnu.org; Wed, 19 Nov 2014 09:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr6Yu-0006eU-O3 for emacs-orgmode@gnu.org; Wed, 19 Nov 2014 09:48:58 -0500 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:40394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr6Yu-0006eI-Jv for emacs-orgmode@gnu.org; Wed, 19 Nov 2014 09:48:52 -0500 Received: by mail-ob0-f177.google.com with SMTP id va2so512157obc.8 for ; Wed, 19 Nov 2014 06:48:51 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Charles C. Berry" Cc: org-mode mailing list #+NAME: t2 #+CALL: t1() :exports results :hlines yes will give the right latex output, thank you! Kind regards, Tian Qiu On Mon, Nov 17, 2014 at 11:08 AM, Charles C. Berry wrote: > 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