From: Christian Moe <email@example.com>
To: Eric Schulte <firstname.lastname@example.org>
Cc: Orgmode Mailing List <email@example.com>
Subject: Re: [babel] How to set multiple variables with properties
Date: Wed, 22 Jun 2011 20:27:00 +0200 [thread overview]
Message-ID: <4E0233F4.firstname.lastname@example.org> (raw)
I was referring to these functions:
I've found a few discussions:
I don't have anything working with them, as such, and I was curious
if anyone did. They don't currently seem to be integrated into
completion, search functions, Babel, and so on, which would limit
their usefulness (though searching can be done with regexps). And I
think implementing wider support for them would run into a problem
with distinguishing between properties that are meant to be
multivalued, or and properties that just contain a single value which
happens to contain spaces.
But handling multiple var=value expressions in a :var: property for
Babel, as Darlan asked about, might perhaps be doable...? Stuff might
 I do have a small research database with some "multivalued"
properties in it. For queries, I use your org-collector and regular
expression matching against properties with multiple values. The
multivalued-properties functions didn't really come into it, except
that knowing they were there made me go ahead and put multiple values
in one property. (As it turned out, that wasn't a very good design
On 6/21/11 11:03 PM, Eric Schulte wrote:
> Hi Christian,
> That's the first I've heard of that variable? If you do get something
> working with multivalued properties please do share.
> Cheers -- Eric
> Christian Moe<email@example.com> writes:
>> Hi, Eric,
>> Just curious: What about the org-entry--multivalued-property functions
>> mentioned in "Using the properties API"?
>> Is anybody using multivalued properties for anything?
>> On 6/21/11 10:17 PM, Eric Schulte wrote:
>>> 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
>>> :var: vars=variables
>>> #+tblname: variables
>>> | var1 | 1 |
>>> | var2 | 2 |
>>> #+begin_src python
>>> print vars
>>> print vars
>>> Best -- Eric
>>> Darlan Cavalcante Moreira<firstname.lastname@example.org> 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
>>>> :var: variable1="value1"
>>>> #+begin_src python :results output
>>>> print variable1
>>>> : value1
>>>> Is it possible to set multiples variables in this way?
>>>> I tried things like
>>>> :var: variable1="value1" variable2="value2"
>>>> :var: variable1="value1",variable2="value2"
>>>> :variable1: "value1"
>>>> :variable2: "value2"
>>>> but none of them worked.
>>>> Darlan Cavalcante
next prev parent reply other threads:[~2011-06-22 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 18:42 [babel] How to set multiple variables with properties Darlan Cavalcante Moreira
2011-06-21 20:17 ` Eric Schulte
2011-06-21 21:01 ` Christian Moe
2011-06-21 21:03 ` Eric Schulte
2011-06-22 18:27 ` Christian Moe [this message]
2011-06-23 1:38 ` Darlan Cavalcante Moreira
2011-06-24 5:28 ` Eric Schulte
2011-06-24 5:25 ` Eric Schulte
2011-06-22 1:03 ` Darlan Cavalcante Moreira
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).