From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Lomov Subject: How to get header in second table generated by src block Date: Sat, 10 Mar 2012 16:00:57 +0900 Message-ID: <20120310070057.GA863@smoon> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6GIb-0008Mi-QC for emacs-orgmode@gnu.org; Sat, 10 Mar 2012 02:01:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6GIa-0006Sx-2o for emacs-orgmode@gnu.org; Sat, 10 Mar 2012 02:01:05 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:64170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6GIZ-0006Ss-Pb for emacs-orgmode@gnu.org; Sat, 10 Mar 2012 02:01:04 -0500 Received: by bkwq16 with SMTP id q16so2013631bkw.0 for ; Fri, 09 Mar 2012 23:01:01 -0800 (PST) Content-Disposition: inline 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: emacs-orgmode@gnu.org --------------------------- 8< --------------------------- #+TITLE: One code two tables Hello, I'm adopting my workflow to org, and now I want to understand what I do wrong in following. Suppose I have two tables with headers and three columns. In export to html I want to get two tables with first and third columns only. The first table is #+name: raw-to-table #+begin_src emacs-lisp :var table=raw :exports results (mapcar (lambda (row) (if (equal row 'hline) ;; <- special handling for 'hline row (list (concat "~" (nth 0 row) "~") (nth 2 row)))) table) #+end_src The second table is #+call: raw-to-table[:exports results](table=raw2) In my environment the second table doesn't have headers. Why? What I do wrong? * COMMENT The tables data #+tblname: raw | Key | Code | Description | |------+-------+-------------| | KEY1 | CODE1 | DESCR1 | | KEY2 | CODE2 | DESCR2 | | KEY3 | CODE3 | DESCR3 | Second table, key, code and description differ. #+tblname: raw2 | Key | Code | Description | |--------+---------+-------------| | KEY_A1 | CODE_A1 | DESCR_A1 | | KEY_A2 | CODE_A2 | DESCR_A2 | | KEY_A3 | CODE_A3 | DESCR_A3 | P.S. This is not mine code I borrowed it from Eric Schulte. Thanks Eric for the code! P.S.S. The ~:exports results~ in ~#+call~ is taken from previous version of code when I tried src block with ~:exports none~ (at first I wanted to separate code and where to insert table). --------------------------- 8< --------------------------- -- It has been said that man is a rational animal. All my life I have been searching for evidence which could support this. -- Bertrand Russell