[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-capture-template: file+datetree+prompt not using prompted da
From: |
Nick Dokos |
Subject: |
Re: [O] org-capture-template: file+datetree+prompt not using prompted date in template |
Date: |
Wed, 04 Nov 2015 17:15:39 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Shankar Rao <address@hidden> writes:
> For the following org capture template:
>
> (setq org-capture-templates
> '(("d" "Date Tree Test" plain
> (file+datetree+prompt "~/org/testdt.org")
> "This date should be the date i picked: %<%y%m%d>")))
>
> Though this is filed under the correct date in the datetree, no matter what
> date I select in the prompt,
> the date displayed in the template is the current date. Is this a bug or a
> feature?
>
It's a feature I guess - org-capture.el says:
;; The current time
(goto-char (point-min))
(while (re-search-forward "%<\\([^>\n]+\\)>" nil t)
(replace-match (format-time-string (match-string 1)) t t))
and there is no provision for another time to be given here. I don't
think there is any provision in the template for a time other than the
current time: at least I can't see a %-escape that takes a different
time.
--
Nick