* org-capture-templates file+datetree+prompt question
@ 2011-12-06 6:04 Erik Hetzner
2011-12-06 6:05 ` Erik Hetzner
2011-12-06 7:43 ` Carsten Dominik
0 siblings, 2 replies; 11+ messages in thread
From: Erik Hetzner @ 2011-12-06 6:04 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
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.
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
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 6:04 org-capture-templates file+datetree+prompt question Erik Hetzner
@ 2011-12-06 6:05 ` Erik Hetzner
2011-12-06 7:43 ` Carsten Dominik
1 sibling, 0 replies; 11+ messages in thread
From: Erik Hetzner @ 2011-12-06 6:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
At Mon, 05 Dec 2011 22:04:33 -0800,
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.
Sorry, this is with org-mode 7.7, emacs 23.2.1, Ubuntu 11.04.
best, Erik
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 6:04 org-capture-templates file+datetree+prompt question Erik Hetzner
2011-12-06 6:05 ` Erik Hetzner
@ 2011-12-06 7:43 ` Carsten Dominik
2011-12-06 8:23 ` Erik Hetzner
1 sibling, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2011-12-06 7:43 UTC (permalink / raw)
To: Erik Hetzner; +Cc: emacs-orgmode
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/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 7:43 ` Carsten Dominik
@ 2011-12-06 8:23 ` Erik Hetzner
2011-12-06 8:26 ` Carsten Dominik
0 siblings, 1 reply; 11+ messages in thread
From: Erik Hetzner @ 2011-12-06 8:23 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
At Tue, 6 Dec 2011 08:43:34 +0100,
Carsten Dominik wrote:
>
>
> 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.
>
> […]
>
> 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?
Hi Carsten,
Maybe it does work as expected (although it should probably be
consistent, as you say). What I am looking for is some way to get the
date I was prompted for to use in the timestamp, so I get:
* 2011
** 2011-12 December
*** 2011-12-08 Thursday
**** Test
<2011-12-08 Thursday>
the idea being that I am entering a scheduled event.
I can’t figure a template replacement string (%-something) to make
this work.
Thanks for your help!
best, Erik
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 8:23 ` Erik Hetzner
@ 2011-12-06 8:26 ` Carsten Dominik
2011-12-06 16:31 ` Erik Hetzner
2011-12-11 19:45 ` Erik Hetzner
0 siblings, 2 replies; 11+ messages in thread
From: Carsten Dominik @ 2011-12-06 8:26 UTC (permalink / raw)
To: Erik Hetzner; +Cc: emacs-orgmode
Hi Erik,
if yout get the latest git version, this is how it is working now.
I agree that it is more consistent this way.
- Carsten
On 6.12.2011, at 09:23, Erik Hetzner wrote:
> At Tue, 6 Dec 2011 08:43:34 +0100,
> Carsten Dominik wrote:
>>
>>
>> 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.
>>
>> […]
>>
>> 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?
>
> Hi Carsten,
>
> Maybe it does work as expected (although it should probably be
> consistent, as you say). What I am looking for is some way to get the
> date I was prompted for to use in the timestamp, so I get:
>
> * 2011
> ** 2011-12 December
> *** 2011-12-08 Thursday
> **** Test
> <2011-12-08 Thursday>
>
> the idea being that I am entering a scheduled event.
>
> I can’t figure a template replacement string (%-something) to make
> this work.
>
> Thanks for your help!
>
> best, Erik
> Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 8:26 ` Carsten Dominik
@ 2011-12-06 16:31 ` Erik Hetzner
2011-12-11 19:45 ` Erik Hetzner
1 sibling, 0 replies; 11+ messages in thread
From: Erik Hetzner @ 2011-12-06 16:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
At Tue, 6 Dec 2011 09:26:03 +0100,
Carsten Dominik wrote:
>
> Hi Erik,
>
> if yout get the latest git version, this is how it is working now.
> I agree that it is more consistent this way.
Thanks, Carsten! I haven’t upgraded, but I copied the diff into my
org-capture.el, and it works great.
best, Erik
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-06 8:26 ` Carsten Dominik
2011-12-06 16:31 ` Erik Hetzner
@ 2011-12-11 19:45 ` Erik Hetzner
2011-12-11 20:37 ` Carsten Dominik
2011-12-11 23:18 ` Bastien
1 sibling, 2 replies; 11+ messages in thread
From: Erik Hetzner @ 2011-12-11 19:45 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
At Tue, 6 Dec 2011 09:26:03 +0100,
Carsten Dominik wrote:
>
> Hi Erik,
>
> if yout get the latest git version, this is how it is working now.
> I agree that it is more consistent this way.
Hi Carten,
Thanks again for this fix.
I have noticed that using k c ... (where ... is a capture template
utilizing file+datetree+prompt) in the agenda now prompts for a
date. Is this intended behavior?
best, Erik
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-11 19:45 ` Erik Hetzner
@ 2011-12-11 20:37 ` Carsten Dominik
2011-12-11 23:18 ` Bastien
1 sibling, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2011-12-11 20:37 UTC (permalink / raw)
To: Erik Hetzner; +Cc: emacs-orgmode
On 11.12.2011, at 20:45, Erik Hetzner wrote:
> At Tue, 6 Dec 2011 09:26:03 +0100,
> Carsten Dominik wrote:
>>
>> Hi Erik,
>>
>> if yout get the latest git version, this is how it is working now.
>> I agree that it is more consistent this way.
>
> Hi Carten,
>
> Thanks again for this fix.
>
> I have noticed that using k c ... (where ... is a capture template
> utilizing file+datetree+prompt) in the agenda now prompts for a
> date. Is this intended behavior?
No, it is not, this is a bug. Grrr.
I'll take a look as soon as I can.
- Carsten
>
> best, Erik
> Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-11 19:45 ` Erik Hetzner
2011-12-11 20:37 ` Carsten Dominik
@ 2011-12-11 23:18 ` Bastien
2011-12-12 0:06 ` Erik Hetzner
1 sibling, 1 reply; 11+ messages in thread
From: Bastien @ 2011-12-11 23:18 UTC (permalink / raw)
To: Erik Hetzner; +Cc: emacs-orgmode, Carsten Dominik
Hi Erik,
Erik Hetzner <egh@e6h.org> writes:
> Thanks again for this fix.
>
> I have noticed that using k c ... (where ... is a capture template
> utilizing file+datetree+prompt) in the agenda now prompts for a
> date. Is this intended behavior?
I can't reproduce this -- I used the capture setting you mentioned
earlier in this thread. Can you provide a minimal test/config file
and the steps to reproduce with latest Org from git?
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-11 23:18 ` Bastien
@ 2011-12-12 0:06 ` Erik Hetzner
2011-12-12 7:05 ` Bastien
0 siblings, 1 reply; 11+ messages in thread
From: Erik Hetzner @ 2011-12-12 0:06 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode, Carsten Dominik
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
At Mon, 12 Dec 2011 00:18:34 +0100,
Bastien wrote:
>
> Hi Erik,
>
> Erik Hetzner <egh@e6h.org> writes:
>
> > Thanks again for this fix.
> >
> > I have noticed that using k c ... (where ... is a capture template
> > utilizing file+datetree+prompt) in the agenda now prompts for a
> > date. Is this intended behavior?
>
> I can't reproduce this -- I used the capture setting you mentioned
> earlier in this thread. Can you provide a minimal test/config file
> and the steps to reproduce with latest Org from git?
Hi Bastien,
My apologies, you are correct. I made two errors:
1. My calendar capture template actually looked like this:
("c" "Calendar" entry (file+datetree+prompt "~/s/notes/calendar.org" "Inbox")
"* %^{What?}\n%t\n%?")
The “Inbox” part was accidentally copied from another template. This
seems to have caused the problem.
2. My other capture template that used file+datetree+prompt that
experienced this behavior actually had a %^t in the template. Whoops!
Thank you so much for looking into this.
best, Erik
[-- Attachment #2: Type: text/plain, Size: 53 bytes --]
Sent from my free software system <http://fsf.org/>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-capture-templates file+datetree+prompt question
2011-12-12 0:06 ` Erik Hetzner
@ 2011-12-12 7:05 ` Bastien
0 siblings, 0 replies; 11+ messages in thread
From: Bastien @ 2011-12-12 7:05 UTC (permalink / raw)
To: Erik Hetzner; +Cc: emacs-orgmode, Carsten Dominik
Hi Erik,
Erik Hetzner <egh@e6h.org> writes:
> My apologies, you are correct. I made two errors:
thanks for confirming and for giving details about what
went wrong in your config! It's important for the list's
archives.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-12-12 7:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 6:04 org-capture-templates file+datetree+prompt question Erik Hetzner
2011-12-06 6:05 ` Erik Hetzner
2011-12-06 7:43 ` Carsten Dominik
2011-12-06 8:23 ` Erik Hetzner
2011-12-06 8:26 ` Carsten Dominik
2011-12-06 16:31 ` Erik Hetzner
2011-12-11 19:45 ` Erik Hetzner
2011-12-11 20:37 ` Carsten Dominik
2011-12-11 23:18 ` Bastien
2011-12-12 0:06 ` Erik Hetzner
2011-12-12 7:05 ` Bastien
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).