From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: org-capture-template: How to correctly capture email addresses? Date: Wed, 09 Nov 2011 10:34:45 +0100 Message-ID: <4EBA4935.20208@christianmoe.com> References: Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RO4Uw-0004Fq-Ny for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 04:31:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RO4Ur-0005mf-66 for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 04:31:10 -0500 Received: from b1.hitrost.net ([91.185.211.67]:59059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RO4Uq-0005mH-S0 for emacs-orgmode@gnu.org; Wed, 09 Nov 2011 04:31:05 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marius Hofert Cc: Emacs help Hi, If org-contacts-template-email doesn't find an address, it doesn't insert a simple text prompt, it inserts a property prompt, which sets the property. A property prompt does not need to be positioned in an explicit property drawer in the template -- in fact, it looks like that will not work. Removing the EMAIL property and moving the "%(org-contacts-template-email)" field out of the property drawer works: (setq org-capture-templates '(("t" "TODO in ~/org/agenda.org -> Tasks" entry (file+headline "~/org/agenda.org" "Tasks") "* TODO %?\nSCHEDULED: %^t\n%U %a") ("c" "Contact in ~/org/contacts.org -> Contact" entry (file+headline "~/org/contacts.org" "Contact") "* %?%(org-contacts-template-name) %^g %(org-contacts-template-email) :PROPERTIES: :URL: :WORK: :HOME: :MOBILE: :LOCATION: :BIRTHDAY: :NOTE: :END:"))) You still get EMAIL at the end of the property drawer, but the order is arbitrary anyway. You could replace the whole properties drawer with property prompts: (setq org-capture-templates '(("t" "TODO in ~/org/agenda.org -> Tasks" entry (file+headline "~/org/agenda.org" "Tasks") "* TODO %?\nSCHEDULED: %^t\n%U %a") ("c" "Contact in ~/org/contacts.org -> Contact" entry (file+headline "~/org/contacts.org" "Contact") "* %?%(org-contacts-template-name) %^g %(org-contacts-template-email) %^{URL}p %^{WORK}p %^{HOME}p %^{MOBILE}p %^{LOCATION}p %^{BIRTHDAY}p %^{NOTE}p"))) ...but then you'd be prompted for everything, each time; you may not want that. Yours, Christian