Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Tassilo Horn <tassilo <at> member.fsf.org>
Subject: Re: org-capture question/suggestion
Newsgroups: gmane.emacs.orgmode
Date: Wednesday 23rd June 2010 12:53:42 UTC (over 6 years ago)
S├ębastien Vauban <[email protected]>
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.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 
CD: 2ms