[Top][All Lists]
[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: |
Sebastien Vauban |
Subject: |
Re: [O] About commit named "Allow multi-line properties to be specified in property blocks" |
Date: |
Tue, 08 Nov 2011 10:31:28 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (windows-nt) |
Hi Eric,
(Due to a high "buzyness" level, I've been a bit out of the discussion for one
week or so)
Eric Schulte wrote:
> The attached patch implements this latest "propname+" suggestion. When
> applied it results in the behavior shown below.
>
> I'm inclined to go with this as a solution moving forward.
>
> Thoughts?
>
> #+property: var foo=1
> #+property: var+ , bar=2
> #+begin_src emacs-lisp
> (+ foo bar)
> #+end_src
So, in a way, adding the + after `var' is how you tell Org that this is an
accumulated property?
Two questions:
1. Why not the + after the property keyword (property+)? I guess because it's
more against other aspects of Org internals? Anyway, putting + after the
var sounds as right to me -- maybe better even if we consider that you
declare var as accumulated, writing so.
2. Must there be a first `var' without `+'? Accepted, tolerated or wrong? I
mean, I'm sure that, due to heavy file editing, we'll sometimes have:
#+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:
To be honest, the only thing that I dislike is the comma in the above line.
Not intuitive at all. Quite hard to read.
Can't the comma be implicitly added by the `+' after the property name?
That would allow one to simply write:
* appending to a file-wide property
:PROPERTIES:
:var+: baz=3
:END:
and have the correct values.
> #+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
Thanks.
Best regards,
Seb
--
Sebastien Vauban
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", (continued)
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/03
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/04
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Darlan Cavalcante Moreira, 2011/11/04
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/04
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/07
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks",
Sebastien Vauban <=
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Sebastien Vauban, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Darlan Cavalcante Moreira, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Sebastien Vauban, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/08
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/09
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Eric Schulte, 2011/11/09
- Re: [O] About commit named "Allow multi-line properties to be specified in property blocks", Rainer M Krug, 2011/11/09