emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] About commit named "Allow multi-line properties to be specified


From: Eric Schulte
Subject: Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"
Date: Tue, 01 Nov 2011 08:36:16 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Correcting myself,
>
>> Typically, what is required here is to add "#+property:" to the
>> cumulative family. Thus,
>>
>> #+property: var foo=1
>> #+property: var bar=2
>>
>> is exactly the same as #+property: var foo=1 var bar=2.
>>
>> Also, make sure var assignations accumulate too.
>
> I don't think "#+property:" should belong to a cumulative family of
> keywords. But Babel "var" keyword definitely should. Thus, the idea
> stays the same: on multiple "var" calls, accumulate values instead of
> replacing them (unless, obviously, the variables has already been
> assigned a value before).

This was one of the proposed options to solve this problem, namely
introduce a list of properties whose value accumulates rather than is
replaced.  Since the property list data structure only allows each key
to appear once, the accumulation would necessarily occur on the value
side, so assuming "var" is an accumulating property, then 

#+property: var foo=1
#+property: var bar=2

would result in `org-file-properties' having the following value

  (("var" . "foo=1 bar=1"))

Which with some changes in the code-block side code could be used by
code blocks to assign multiple variables.

I went with changing property syntax rather than internal behavior
because I am not overly familiar with properties or the code with which
they were implemented and I felt (probably incorrectly) that this would
be a less dramatic change to Org-mode.  I'm happy to work up a solution
along the lines suggested above, which would introduce a variable like
`org-accumulating-properties' or some-such which would default to only
holding the "var" property name

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]