|
From: | Charles Cave |
Subject: | [Orgmode] Re: How do I insert just a time stamp in a capture template? |
Date: | Thu, 9 Dec 2010 22:14:09 +0000 (UTC) |
User-agent: | Loom/3.14 (http://gmane.org/) |
Charles Cave <charles.cave <at> gmail.com> writes: > ("l" "Log Time" > entry (file+datetree "c:/charles/My Dropbox/GTD/timelog.org") > "** %U - %^{Activity} :TIME:") > How can I just include a time only in the heading? Thank you Juan for responding to my question: %(sexp) allows to include lisp expressions in a capture template. %(format-time-string "%H:%M") should insert the current time. My template now looks like ("l" "Log Time" entry (file+datetree "c:/charles/My Dropbox/GTD/timelog.org") "** %(format-time-string \"%H:%M\") - %^{Activity} :TIME:") Note the escaped quotation marks near %H:%M because this function is inside another string. Here are today's entries from the timelog.org file *** 2010-12-10 Friday **** 08:45 - Arrived - coffee and email :TIME: **** 09:00 - Updated sexp in .emacs :TIME: **** 09:13 - Responded to org-mode postings :TIME:
[Prev in Thread] | Current Thread | [Next in Thread] |