From: Viktor Rosenfeld <listuser36@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Setting multiple variables for code blocks in one property drawer
Date: Wed, 15 Feb 2012 20:12:45 +0100 [thread overview]
Message-ID: <20120215191245.GA20893@client194-112.wlan.hu-berlin.de> (raw)
In-Reply-To: <87haysuo20.fsf@gmx.com>
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 <listuser36@googlemail.com> 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/
>
next prev parent reply other threads:[~2012-02-15 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 12:46 Setting multiple variables for code blocks in one property drawer Viktor Rosenfeld
2012-02-15 15:08 ` Eric Schulte
2012-02-15 19:12 ` Viktor Rosenfeld [this message]
2012-02-18 15:32 ` Eric Schulte
2012-02-20 11:43 ` Viktor Rosenfeld
2012-02-25 19:11 ` Eric Schulte
2012-02-27 7:00 ` Viktor Rosenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120215191245.GA20893@client194-112.wlan.hu-berlin.de \
--to=listuser36@googlemail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).