From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) 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 Message-ID: References: <4EEB55A4.7090900@googlemail.com> <8762h3h104.fsf@gnu.org> <80d3bbv133.fsf@somewhere.org> <4EFB5D1E.3080109@jacobs-university.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rfye2-0007ww-6q for emacs-orgmode@gnu.org; Wed, 28 Dec 2011 13:54:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rfye0-0005P5-Rd for emacs-orgmode@gnu.org; Wed, 28 Dec 2011 13:54:34 -0500 Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:46829) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Rfye0-0005Ot-IB for emacs-orgmode@gnu.org; Wed, 28 Dec 2011 13:54:32 -0500 In-Reply-To: <4EFB5D1E.3080109@jacobs-university.de> (Christoph LANGE's message of "Wed, 28 Dec 2011 19:17:02 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christoph LANGE Cc: Sebastien Vauban , emacs-orgmode@gnu.org Christoph LANGE writes: > Hi Seb, > > thanks for your help! > > 2011-12-26 15:50 Sebastien Vauban: >>> Christoph LANGE 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-m= ode >>>> >>>> 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_=E2=80=A6): >> >> =E2=80=A6 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 support= ed. >> >> 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+.=20=20 * Accumulative properties syntax=20 #+property: not-var 0 :PROPERTIES: :not-var+: 3 :END: #+begin_src emacs-lisp=20 (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 --=20 Thomas S. Dye http://www.tsdye.com