From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Reproducing a table Date: Mon, 13 Mar 2017 19:13:45 +0200 Message-ID: <874lyxje0m.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnToL-0000j7-2e for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 13:31:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnToG-0001m9-25 for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 13:31:09 -0400 Received: from [195.159.176.226] (port=37986 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnToF-0001lu-RZ for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 13:31:03 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cnTXX-0003Pt-TD for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 18:13:47 +0100 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" To: emacs-orgmode@gnu.org Greetings (again). What is the smartest way to reproduce a table without defining the table as an Org source block (constraint explained below). I can do the following, but it doesn't seem very sane (need to use elisp or some other language just to funnel the table). # ----------------------------------------------------------------- * define table #+name: my-table | row 1 | 1 | 2 | | row 2 | 3 | 4 | |-------+-------+-------| | | col 1 | col 2 | * reproduce entire table I need to be able to reproduce the entire table in my document #+BEGIN_SRC elisp :var data=my-table :hlines yes (print data) #+END_SRC #+RESULTS: | row 1 | 1 | 2 | | row 2 | 3 | 4 | |-------+-------+-------| | | col 1 | col 2 | * reproduce only data I also need to be able to pass only the data to functions #+BEGIN_SRC elisp :var data=my-table[0:1,1:2] (print data) #+END_SRC #+RESULTS: | 1 | 2 | | 3 | 4 | # ----------------------------------------------------------------- The reason I can _not_ define the table as an Org source block is the second example. I need to pass parts of the table as data to functions, and constructs like my-table()[0:1,1:2] don't work. (At least I have not been able to get them to work.) Jarmo