emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-capture-templates file+datetree+prompt question


From: Carsten Dominik
Subject: Re: [O] org-capture-templates file+datetree+prompt question
Date: Tue, 6 Dec 2011 08:43:34 +0100

On 6.12.2011, at 07:04, Erik Hetzner wrote:

> Hi all,
> 
> I would like to use a capture template to capture calendar entries &
> file them to a date tree organized calendar.org file.
> 
> 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.
> 
> I have tried the following template:
> 
>  (setq org-capture-templates
>        '(("c" "Calendar" entry (file+datetree+prompt "~/s/notes/calendar.org")
>           "* %^{What?}\n%t\n%?")))
> 
> 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’s 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



> 
> 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.
> 
> Any thoughts on how to fix this?
> 
> best, Erik
> Sent from my free software system <http://fsf.org/>.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]