In a Lisp function, how do I instruct org to automatically insert a timestamp with today's date?
I found the function org-insert-time-stamp, but I don't know how to provide an argument for it that will return today's date.
The documentation for the function says:
(org-insert-time-stamp TIME &optional WITH-HM INACTIVE PRE POST EXTRA)
...but I don't see where to find documentation about what TIME &optional WITH-HM INACTIVE PRE POST EXTRA means or how to specify these in a function.
And here's the function I'm trying to write:
(defun org-today-heading-and-clock-in ()
"Insert a new heading with today's date, and then clock in."
(interactive)
(org-insert-subheading)
(org-insert-time-stamp (today))
(org-clock-in))
timeis used byformat-time-string. And that doc explains more clearly whattimeis. – abo-abo Jan 10 '15 at 20:25format-time-string, saying that theTIMEarg is of the same kind, or it should say what the doc string offormat-time-stringsays aboutTIME: "TIME is specified as (HIGH LOW USEC PSEC), as returned bycurrent-time' orfile-attributes'. The obsolete form (HIGH . LOW) is also still accepted." – Drew Jan 10 '15 at 21:02(org-time-stamp ARG &optional INACTIVE)to give you a pop-up calendar to choose the date that you wish to insert. It is bound toC-x iby default. – grettke Jan 11 '15 at 00:31C-x iby default, it'sC-c .– nanny Jan 13 '15 at 14:29C-c .! – grettke Jan 14 '15 at 14:54C-u C-c .– Steve Oct 05 '18 at 13:24