Sébastien Vauban <wxhgmqzgw...@spammotel.com>
writes:

Hi Sébastien,

> Just for me to understand, what would you expect when you say that
> properties should be appended?
>
> - multiple creation dates?
> - multiple links?

Hm, good question.  I use properties as a kind of metadata hashtable, so
I'd expect that existing properties get overridden and new properties
get appended to an already existing properties block.

But appending to the existing value might also be nice in some
situations...

In any way, I'm against creating many equally named properties for an
entry, because although `org-entry-properties' states that keys
(property names) may occur many times, `org-entry-get' returns only the
value of the first, right?

> Maybe, even, you would want different behaviors for the different
> properties?
>
> - creation dates not "append-able": the first one is kept?
> - links appended in sequence?

Rename :created: to :edited: and then it's appendable, too. ;-)

But the suggestion is good.  There should be a new property API function
`org-append-property PROP VAL' which appends VAL to the existing values,
and that could be used in property templates then.

So that slightly contrieved example would override the :lastedit: date,
and append to :edited: and :link:.

  ("x" "Add some text" plain
   (id "bkeirkbeikboeiceibkebiknbk")
   "Hello! %i"
   :properties (("lastedit" "%U")
                ("edited"   "%U" :append)
                ("link"     "%a" :append)))

Bye,
Tassilo


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to