[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bugs/features of accumulating property values when used with ent
From: |
Sebastien Vauban |
Subject: |
Re: [O] Bugs/features of accumulating property values when used with entries (concretely: in org-contacts) |
Date: |
Thu, 29 Dec 2011 09:03:54 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (windows-nt) |
Hi Christophe, Eric and Thomas,
Eric Schulte wrote:
> Christoph LANGE <address@hidden> writes:
>> 2011-12-26 15:50 Sebastien Vauban:
>>>> Christoph LANGE<address@hidden> writes:
>>>>> 2. accumulation doesn't work within the same entry; details follow:
>>>>>
>>>>> So when I changed the above contact entry to
>>>>>
>>>>> * Contact Name
>>>>> :PROPERTIES:
>>>>> :EMAIL: address@hidden
>>>>> :EMAIL+: address@hidden
>>>>> :END:
>>>>>
>>>>> I would have expected (org-entry-get (point) "EMAIL" t) to evaluate to,
>>>>> well,
>>>>>
>>>>> at least "address@hidden address@hidden" (and in some later version of
>>>>> org-mode
>>>>>
>>>>> maybe to a two-item list, for even easier automated processing). But I
>>>>> got
>>>>>
>>>>> the following unexpected results, which indicate that accumulation is not
>>>>> yet
>>>>>
>>>>> supported in this context (well, if it was ever _intended_…):
>
> See the attached file for an example of working property inheritance.
> [...]
>
> * Contact Name
> :PROPERTIES:
> :FOO: 1
> :FOO+: 2
> :END:
>
> #+begin_src emacs-lisp
> (org-entry-get (point) "FOO" 'inherit)
> #+end_src
>
> #+results:
> : 1
>
> While it is not possible to accumulate two properties from within the
> same block, property accumulation does successfully add to the inherited
> values of variables.
>
> I don't know if it should be possible to accumulate properties within
> the same property block. I would imagine so, in which case the behavior
> should be considered a bug.
I would say so (that it's a bug), as doing it on a file-basis (within the
"same property block") is well supported:
#+PROPERTY: FOO 1
#+PROPERTY: FOO+ 2
* Contact Name
#+begin_src emacs-lisp
(org-entry-get (point) "FOO" 'inherit)
#+end_src
#+results:
: 1 2
>>> … AFAIK the `+' is only supported at this stage for the `var'
>>> property: you can't take any property and add a `+' to
>
> FALSE, the "var" property is in no way special when it comes to property
> inheritance. All properties are treated equally.
Sorry for insinuating it otherwise. And thanks for the correction!
Best regards,
Seb
--
Sebastien Vauban