From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: org-capture question/suggestion Date: Tue, 22 Jun 2010 21:45:31 +0200 Message-ID: <877hlqetr8.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=32982 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR9Pn-0006nS-4u for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 15:45:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR9Pl-0003A1-Ou for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 15:45:47 -0400 Received: from lo.gmane.org ([80.91.229.12]:51408) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR9Pl-00039T-F8 for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 15:45:45 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OR9Pj-0005sL-8k for emacs-orgmode@gnu.org; Tue, 22 Jun 2010 21:45:43 +0200 Received: from p54af00d1.dip0.t-ipconnect.de ([84.175.0.209]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2010 21:45:43 +0200 Received: from tassilo by p54af00d1.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2010 21:45:43 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, as already said, I really like the new org-capture interface. But there's one thing concerning the templates, which might be optimized a bit. I want to add certain information accessible with template escapes as properties. So as an example, I have a template like this: ("t" "TODO" entry (file "/home/horn/repos/org/remember.org") "* TODO %?\n :PROPERTIES:\n :created: %U\n :link: %a\n :END:\n %i") The creation date %U is always there, so that's no problem. But the link accessible with %a may be nil. Then, I really don't want to have a :link: property. Currently, I simply delete that line before filing the item. That's a bit inconvenient, and that I have to deal with indentation in the template is another inconvenience. And it won't work when my capture template doesn't create a new entry, but appends to an existing one. In that case, properties should be appended to existing properties, too. So what I would love to see was a possibility to have property escapes, which use the property API and only add properties that have a value. Then the property API would handle the correct indentation and everything else. Maybe, a good syntax would be %:propname:X, where X is one of the normal escapes without the leading %. Then I could write the template above like that: ("t" "TODO" entry (file "/home/horn/repos/org/remember.org") "* TODO %?\n %i %:created:U %:link:a") Well, I don't really care about the syntax. Maybe it's better to specify properties outside the template, because they won't be inserted at the exact position defined in the template anyway, especially if type is not 'entry. So how about something like that: ("t" "TODO" entry (file "/home/horn/repos/org/remember.org") "* TODO %?\n %i" :properties (("created" "%U") ("link" "%a"))) What do you think? Bye, Tassilo