From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: extract a region from a table and export it Date: Fri, 17 Jun 2016 07:03:06 -0400 Message-ID: References: <87oa74vyma.fsf@mat.ucm.es> <87d1nkvuat.fsf@mat.ucm.es> <87oa733g28.fsf@gmx.us> <87porh2jp8.fsf@mat.ucm.es> <87porgyysf.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDrYR-0001Na-2L for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 07:03:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDrYL-0001fK-4A for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 07:03:14 -0400 Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:35773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDrYK-0001eh-VZ for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 07:03:09 -0400 Received: by mail-qk0-x22b.google.com with SMTP id c73so80835817qkg.2 for ; Fri, 17 Jun 2016 04:03:08 -0700 (PDT) In-reply-to: <87porgyysf.fsf@mat.ucm.es> 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: Uwe Brauer Cc: emacs-orgmode@gnu.org the problem seems to be that c0 and c2 are set to nil for some reason. I doubt dash has anything to do with it. Try these: #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c0 #+END_SRC #+RESULTS: | 1 | 2 | 3 | 4 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c2 #+END_SRC #+RESULTS: | 3 | 4 | 6 | 7 | Here is a non-dash solution that works for two lists. #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (loop for a in c0 for b in c2 collect (list a b)) #+END_SRC #+RESULTS: | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 7 | Uwe Brauer writes: >>>> "John" == John Kitchin writes: > > > (require 'dash) > > #+tblname: tab2 > > | 1 | a | 3 | > > > | 2 | b | 4 | > > | 3 | c | 6 | > > | 4 | d | 7 | > > > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > > (-zip-with 'list c0 c2) > > #+END_SRC > > That does not work for me (I loaded dash) > > Here is the backtrace > I also deleted the "-" in (-zip-with 'list c0 c2) to obtain > (zip-with 'list c0 c2), but zip-with is not known as a command. -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu