From: tsd@tsdye.com (Thomas S. Dye)
To: Christoph LANGE <ch.lange@jacobs-university.de>
Cc: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>, emacs-orgmode@gnu.org
Subject: Re: Bugs/features of accumulating property values when used with entries (concretely: in org-contacts)
Date: Wed, 28 Dec 2011 08:54:23 -1000 [thread overview]
Message-ID: <m1obusle74.fsf@tsdye.com> (raw)
In-Reply-To: <4EFB5D1E.3080109@jacobs-university.de> (Christoph LANGE's message of "Wed, 28 Dec 2011 19:17:02 +0100")
Christoph LANGE <ch.lange@jacobs-university.de> writes:
> Hi Seb,
>
> thanks for your help!
>
> 2011-12-26 15:50 Sebastien Vauban:
>>> Christoph LANGE<ch.lange@jacobs-university.de> 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: foo@bar.org
>>>> :EMAIL+: bar@baz.org
>>>> :END:
>>>>
>>>> I would have expected (org-entry-get (point) "EMAIL" t) to evaluate to, well,
>>>>
>>>> at least "foo@bar.org bar@baz.org" (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_…):
>>
>> … AFAIK the `+' is only supported at this
>> stage for the `var' property: you can't take any property and add a `+' to
>>
>> transform it in an accumulative property.
>>
>> Whether this should be restricted by default or open by default, I have no
>>
>> opinion at this stage.
>
> If it is intended to be limited to the "var" property, then at least the
> documentation ("Property syntax") needs fixing, as it states generally:
>
>> If you want to add to the value of an existing property, append a
>> `+' to the property name.
>
> But thanks a lot for pointing this out:
>
>> I know, however, multivalued properties are sort of already well supported.
>>
>> See http://orgmode.org/manual/Using-the-property-API.html for more info.
>
> Cheers,
>
> Christoph
Aloha Christoph and Seb,
The following example shows that the accumulative property isn't
restricted to var/var+.
* Accumulative properties syntax
#+property: not-var 0
:PROPERTIES:
:not-var+: 3
:END:
#+begin_src emacs-lisp
(org-entry-get (point) "not-var" t)
#+end_src
#+results:
: 0 3
To run the example, you'll need to refresh the local setup by C-c
C-c on the #+property: not-var 0 line, then execute the emacs-lisp
source block.
I didn't follow this thread closely, so I don't know if my experience is
useful, but when I briefly studied the accumulative property syntax I
tripped up on two things: 1) I often forgot to renew the local setup so
that changes in #+property: lines would take effect; and 2) I tried to
add more than one instance of a property in a drawer, which isn't
allowed.
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
next prev parent reply other threads:[~2011-12-28 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 14:28 Bugs/features of accumulating property values when used with entries (concretely: in org-contacts) Christoph LANGE
2011-12-26 14:16 ` Bastien
2011-12-26 14:50 ` Sebastien Vauban
2011-12-28 18:17 ` Christoph LANGE
2011-12-28 18:47 ` Eric Schulte
2011-12-29 8:03 ` Sebastien Vauban
2011-12-28 18:54 ` Thomas S. Dye [this message]
2012-01-21 5:48 ` Samuel Wales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1obusle74.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=ch.lange@jacobs-university.de \
--cc=emacs-orgmode@gnu.org \
--cc=wxhgmqzgwmuf@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).