emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Bugs/features of accumulating property values when used with entries (concretely: in org-contacts)
Date: Thu, 29 Dec 2011 09:03:54 +0100	[thread overview]
Message-ID: <80ehvnyfbp.fsf@somewhere.org> (raw)
In-Reply-To: 874nwkcz45.fsf@gmx.com

Hi Christophe, Eric and Thomas,

Eric Schulte wrote:
> Christoph LANGE <ch.lange-shsDHVVYhWkzrYMiTdX2twxv4HzkJkzx@public.gmane.org> writes:
>> 2011-12-26 15:50 Sebastien Vauban:
>>>> Christoph LANGE<ch.lange-shsDHVVYhWkzrYMiTdX2twxv4HzkJkzx@public.gmane.org>  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-8kAbNik00GA@public.gmane.org
>>>>>    :EMAIL+:   bar-mlkRCKUPihU@public.gmane.org
>>>>>    :END:
>>>>>
>>>>> I would have expected (org-entry-get (point) "EMAIL" t) to evaluate to, well,
>>>>>
>>>>> at least "foo-8kAbNik00GA@public.gmane.org bar-mlkRCKUPihU@public.gmane.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_…):
>
> 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

  reply	other threads:[~2011-12-29  8:03 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 [this message]
2011-12-28 18:54       ` Thomas S. Dye
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=80ehvnyfbp.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /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).