From: Charles Cave <charles.cave@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How do I insert just a time stamp in a capture template?
Date: Thu, 9 Dec 2010 22:14:09 +0000 (UTC) [thread overview]
Message-ID: <loom.20101209T231029-80@post.gmane.org> (raw)
In-Reply-To: loom.20101208T230244-676@post.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 parent reply other threads:[~2010-12-09 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 22:08 How do I insert just a time stamp in a capture template? Charles Cave
2010-12-09 20:32 ` Juan Pechiar
2010-12-09 22:14 ` Charles Cave [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20101209T231029-80@post.gmane.org \
--to=charles.cave@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).