From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: Setting multiple variables for code blocks in one property drawer Date: Wed, 15 Feb 2012 20:12:45 +0100 Message-ID: <20120215191245.GA20893@client194-112.wlan.hu-berlin.de> References: <20120209124619.GA29989@kenny.local> <87haysuo20.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxkHk-0004aQ-Ky for emacs-orgmode@gnu.org; Wed, 15 Feb 2012 14:13:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxkHd-00016Z-O4 for emacs-orgmode@gnu.org; Wed, 15 Feb 2012 14:13:00 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:56871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxkHd-00015a-H9 for emacs-orgmode@gnu.org; Wed, 15 Feb 2012 14:12:53 -0500 Received: by bkty12 with SMTP id y12so1540065bkt.0 for ; Wed, 15 Feb 2012 11:12:50 -0800 (PST) Content-Disposition: inline In-Reply-To: <87haysuo20.fsf@gmx.com> 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 Hi Eric, thanks for your input. I just pulled the latest code from git and while my original example works, the following does not: :PROPERTIES: :var: foo=1 :var+: bar=2 :var+: baz=3 :END: #+BEGIN_SRC sh echo foo: $foo echo bar: $bar echo baz: $baz #+END_SRC If I evaluate the source block I get the following error in the messages buffer: =: Args out of range: "", 0 The following works: :PROPERTIES: :var: foo=1 :var+: bar=2 baz=3 :END: #+BEGIN_SRC sh echo foo: $foo echo bar: $bar echo baz: $baz #+END_SRC There also appears to be a difference between quoted and unquoted values and commatas. E.g. the following works :PROPERTIES: :var: foo=1 :var+: bar="2", baz=3 :END: #+BEGIN_SRC sh echo foo: $foo echo bar: $bar echo baz: $baz #+END_SRC If I remove the quotes around 2 I get the following error: ad-Orig-error: reference '2,' not found in this buffer On the other hand, the following version does not produce an error, but the value of $baz is not set. :PROPERTIES: :var: foo=1 :var+: bar="2", :var+: baz=3 :END: #+BEGIN_SRC sh echo foo: $foo echo bar: $bar echo baz: $baz #+END_SRC Cheers, Viktor Eric Schulte wrote: > Viktor Rosenfeld writes: > > > Hi, > > > > after following the discussion about the new BABEL syntax I was under > > the impression that the following should work to set two variables in > > one PROPERTIES drawer: > > > > :PROPERTIES: > > :var: foo=1 > > :var+: bar=2 > > :END: > > > > However, the definition of bar is ignored. It turns out that there can > > only be one :var: or :var+: entry in a drawer and the latter can only be > > used to append to inherited entries, but not to those defined in the > > same drawer. Is this the intended behavior? How would I define multiple > > variables in a drawer (except for putting them all on one line)? > > > > Thanks, > > Viktor > > > > You are correct, I believe this is a bug. I've just pushed up a fix, so > your example above should now work as expected. > > Thanks, > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ >