From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: extract a region from a table and export it Date: Tue, 14 Jun 2016 18:12:31 +0200 Message-ID: <87oa733g28.fsf@gmx.us> References: <87oa74vyma.fsf@mat.ucm.es> <87d1nkvuat.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCrFC-00046e-7i for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 12:31:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCrF7-00033z-Tl for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 12:31:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:59671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCrF7-00033S-N1 for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 12:31:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bCr6e-0006YB-Q4 for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 18:22:26 +0200 Received: from 60.red-79-156-128.staticip.rima-tde.net ([79.156.128.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2016 18:22:24 +0200 Received: from rasmus by 60.red-79-156-128.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2016 18:22:24 +0200 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 Uwe Brauer writes: >>>> "John" == John Kitchin writes: > > > > > or, rows 0, 1 and 4. > > > #+BEGIN_SRC emacs-lisp :var d=data > > (loop for i in '(0 1 4) collect (elt d i)) > > #+END_SRC > > Ok the second code works now, and is almost what I want, but I need it > mostly for columns, it is not obvious for me that corresponds in the > syntax above to columns. See (info "(org) var") in particular the section on "Indexable variable values". Additionally, an empty index, or the single character ‘*’, are both interpreted to mean the entire range and as such are equivalent to ‘0:-1’, as shown in the following example in which the entire first column is referenced. #+NAME: example-table | 1 | a | | 2 | b | | 3 | c | | 4 | d | #+BEGIN_SRC emacs-lisp :var data=example-table[,0] data #+END_SRC #+RESULTS: | 1 | 2 | 3 | 4 | -- If you can mix business and politics wonderful things can happen!