emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: Re: org-capture question/suggestion
Date: Wed, 23 Jun 2010 14:53:42 +0200	[thread overview]
Message-ID: <87tyotyko9.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 87vd9ajjbu.fsf@mundaneum.com

Sébastien Vauban <wxhgmqzgwmuf@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

  reply	other threads:[~2010-06-23 12:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 19:45 org-capture question/suggestion Tassilo Horn
2010-06-23  7:31 ` Sébastien Vauban
2010-06-23 12:53   ` Tassilo Horn [this message]
2010-06-23  8:05 ` Carsten Dominik

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=87tyotyko9.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-orgmode@gnu.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).