From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-capture-template: file+datetree+prompt not using prompted date in template Date: Wed, 04 Nov 2015 17:15:39 -0500 Message-ID: <87pozpifcb.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu6LV-0006DL-A0 for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu6LR-00043S-6j for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:15:57 -0500 Received: from plane.gmane.org ([80.91.229.3]:53057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu6LR-00043D-0H for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 17:15:53 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zu6LN-0000be-Gn for emacs-orgmode@gnu.org; Wed, 04 Nov 2015 23:15:49 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2015 23:15:49 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2015 23:15:49 +0100 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: emacs-orgmode@gnu.org Shankar Rao 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