From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-capture-templates file+datetree+prompt question Date: Tue, 6 Dec 2011 08:43:34 +0100 Message-ID: <1109C5C3-535E-4F5E-AE11-76B3B9AD1FF2@gmail.com> References: <87d3c2nslq.wl%egh@e6h.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXpgl-00025N-CL for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 02:43:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXpgj-0004aL-Tg for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 02:43:43 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:57506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXpgj-0004aB-Oa for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 02:43:41 -0500 Received: by eekd1 with SMTP id d1so1042410eek.0 for ; Mon, 05 Dec 2011 23:43:40 -0800 (PST) In-Reply-To: <87d3c2nslq.wl%egh@e6h.org> 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: Erik Hetzner Cc: emacs-orgmode On 6.12.2011, at 07:04, Erik Hetzner wrote: > Hi all, >=20 > I would like to use a capture template to capture calendar entries & > file them to a date tree organized calendar.org file. >=20 > Specifically, what I want to happen is this: the template prompts me > for a date, then prompts me for headline. The date should be used for > the datetree & used as a datestamp in the headline. >=20 > I have tried the following template: >=20 > (setq org-capture-templates > '(("c" "Calendar" entry (file+datetree+prompt = "~/s/notes/calendar.org") > "* %^{What?}\n%t\n%?"))) >=20 > What happens with this is that I get prompted for a date, which is > used to file the entry in the datetree, but the date in the headline > is always today=92s date. I tried to reproduce this. When I do this and enter the date two days into the future (8 December), I get * 2011 ** 2011-12 Dezember *** 2011-12-08 Donnerstag **** Test <2011-12-06 Di> So the headline uses in fact the date that was entered at the prompt, only the %t is replaced by the current date. I would think this all works as expected. Maybe I am missing something? I see that when I do "k c" from the agenda, then indeed also the %t is replaced with the cursor date. So indeed, this is a bit inconsistent. What would be the right behavior? - Carsten >=20 > If I use `k c` in the agenda (org-agenda-action) this works as > expected, with no prompting for a date, the entry filed properly in > the datetree, and the date in the headline set properly. >=20 > Any thoughts on how to fix this? >=20 > best, Erik > Sent from my free software system .