From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] How to set multiple variables with properties Date: Tue, 21 Jun 2011 13:17:17 -0700 Message-ID: <87y60vhrci.fsf@gmail.com> References: <4e00e5ff.634dec0a.10c2.462f@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ7O0-0000TX-Um for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:17:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ7Ny-0001Vu-OG for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:17:24 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:50294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ7Ny-0001Vq-Er for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:17:22 -0400 Received: by pvc12 with SMTP id 12so101280pvc.0 for ; Tue, 21 Jun 2011 13:17:21 -0700 (PDT) In-Reply-To: <4e00e5ff.634dec0a.10c2.462f@mx.google.com> (Darlan Cavalcante Moreira's message of "Tue, 21 Jun 2011 15:42:03 -0300") 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: Darlan Cavalcante Moreira Cc: Orgmode Mailing List Unfortunately org-mode properties only allow a single entry for any given key, so you can only specify one variable using properties. However the following workaround does exist. *** alternative :PROPERTIES: :var: vars=variables :END: #+tblname: variables | var1 | 1 | | var2 | 2 | #+begin_src python print vars[0][1] print vars[1][1] #+end_src Best -- Eric Darlan Cavalcante Moreira writes: > I'm using org-babel to automate a few tasks and I'd like to define a few > variables that are common to several code blocks as sub-tree properties. > > It works when I have only one variable, where I can use > * Heading > :PROPERTY: > :var: variable1="value1" > :END: > #+begin_src python :results output > print variable1 > #+end_src > > #+results: > : value1 > > Is it possible to set multiples variables in this way? > I tried things like > :PROPERTY: > :var: variable1="value1" variable2="value2" > :END: > > :PROPERTY: > :var: variable1="value1",variable2="value2" > :END: > > :PROPERTY: > :variable1: "value1" > :variable2: "value2" > :END: > but none of them worked. > > > -- > Darlan Cavalcante > -- Eric Schulte http://cs.unm.edu/~eschulte/