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, 08 Nov 2011 15:53:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

> Perhaps inserting an assumed space separator would be more intuitive?
> If we were to go that way it may be possible to allow variable
> specifications such as
>
> #+PROPERTY: var foo=1 bar=2
>
> in which case properties could be easily specified on multiple lines
> using a default space separator.
>
> If this seems like a good way to go I can try to update my previous
> patch.
>

I've updated the patch, the newest version is attached.  It results in
the following behavior.

#+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

* overwriting a file-wide property
  :PROPERTIES:
  :var:      foo=7
  :END:

#+begin_src emacs-lisp
  foo
#+end_src

#+results:
: 7

#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src

#+results:
: foo=7

* appending to a file-wide property
  :PROPERTIES:
  :var+:      baz=3
  :END:

#+begin_src emacs-lisp
  (+ foo bar baz)
#+end_src

#+results:
: 6

#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src

#+results:
: foo=1 bar=2 baz=3

Attachment: 0001-property-names-ending-in-plus-accumulate.patch
Description: Text Data

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

reply via email to

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