Christian Moe <m...@christianmoe.com> writes: > On 11/1/11 5:58 PM, Eric Schulte wrote: > >>>> 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")) > > Given this: > > --- > > > #+property: var foo=1 > #+property: var bar=2 > > * Heading > :PROPERTIES: > :var: foo=3 > :END: > > > --- > > Would it result in (("var" . "foo=3 bar=2"))? >
Good catch Christian, I get the following behavior, currently seems the property-block specification overwrites the global property. I'll have to update my patch to append at the subheading level as well.
#+property: var foo=1 #+property: var bar=2 #+begin_src emacs-lisp (+ foo bar) #+end_src #+results: : 3 #+begin_src emacs-lisp (org-entry-get (point) "var" t) #+end_src #+results: : foo=1, bar=2 * heading :PROPERTIES: :var: foo=4 :END: #+begin_src emacs-lisp foo #+end_src #+results: : 4 #+begin_src emacs-lisp (org-entry-get (point) "var" t) #+end_src #+results: : foo=4
As for variable handling, I think the solution is to ensure that on the code-block side of things, a var string like "foo=3, bar=2, foo=1" results in, foo=1 bar=2 that is, subtree variable definitions will pre-empty earlier definitions of the same variable.. Best -- Eric > > Yours, > Christian -- Eric Schulte http://cs.unm.edu/~eschulte/