From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Millar Subject: Re: org-capture -- optionally add time-of-day as with C-c . ? Date: Wed, 10 Feb 2016 13:47:50 -0500 Message-ID: <56BB85D6.3050305@verizon.net> References: <20160210092256.GA12739@s70206.gridserver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTakj-0004cN-DA for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 14:48:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTakg-000624-O7 for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 14:48:41 -0500 Received: from vms173011pub.verizon.net ([206.46.173.11]:35938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTakg-0005tX-Ik for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 14:48:38 -0500 Received: from vz-proxy-m003.mx.aol.com ([64.236.83.12]) by vms173011.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O2C001D4HJRMV60@vms173011.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 12:47:52 -0600 (CST) In-reply-to: <20160210092256.GA12739@s70206.gridserver.com> 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 Hi John, On 02/10/2016 04:22 AM, John Magolske wrote: > In setting up org-capture, I'd like to have behaviour similar to what > `org-time-stamp` provides, which by default is bound to: > > C-c . > > That command in org-mode brings up a 3-month calendar and a minibuffer > prompt for entering a date. With nothing entered at the prompt, just a > RET, a timestamp with the current date is inserted like so: > > <2016-02-09 Tue> > > If a date is picked from the calender, say March 26, then that date > is inserted: > > <2016-03-26 Sat> > > If, for example, 2pm is entered at the minibuffer prompt and March 8 > is picked from the calender, then a timestamp like so gets inserted: > > <2016-03-08 Tue 14:00> > > I find this to be a very nice, intuitive interface. Time-of-day is > easily added, but only if explicitly input. Otherwise just the date > shows up. I'm having a hard time setting this up for org-capture... > I can get close with something like: > > (setq org-capture-templates > '(("t" "todo" entry (file+headline "~/org/todo.org" "Tasks") > "* TODO %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t) t)\n"))) > > But that always inserts a time-of-day into the timestamp, using the > current time if nothing is input at the minibuffer prompt. So if I > just pick March 8 from the calender, that date will be inserted along > with the current time-of-day like so: > > ** TODO > SCHEDULED: <2016-03-08 Mon 00:53> > > Which pretty much always necessitates a manual edit of the time to > either remove it or adjust it to something relevant. > > When explicitly adding a time value at the prompt in the minibuffer, > 2pm for example, then picking March 8, this would show up: > > ** TODO > SCHEDULED: <2016-03-08 Tue 14:00> > > And that works great. It's just the aforementioned situation where no > time-of-day is entered and the current time-of-day gets associated > with some future-date timestamp rather than just having that date show > up by itself with no time-of-day. > > Is there some way to have the `C-c .` behaviour outlined above happen > in org-capture? > > Have you tried the template expansion %^T (active time stamp prompt with date and time); Also %^U is the inactive equivalent, etc. Charlie Millar