I would like org-capture template to capture time at creation so I can use this recorded time later for routine cleaning of old tasks.

Currently I use this template with the %t expansion.

(setq org-capture-templates
  '(("p" "PRIVAT-TODO" entry (file+headline "/home/max/org/organizer.org" "Private")
     "* TODO %? %^g\n %t")))

But org uses timestamp to schedule and not for recording capture time.

What is the proper way to record when an item was captured?

How can I then us the time to sort in todo list views.

  • 1
    What is a todo list view? Is that the master org-mode file with all of your tasks/events? Is it a custom view in the *Org Agenda* buffer? Does the function org-sort-entries help any with respect to sorting the master org-mode file (it operates on a main heading, or on a selected region)? – lawlist May 16 '16 at 16:36
  • org-capture-tamplates can accept a function to locate a target, so if the default append or the optional :prepend of the new capture item will not suffice, then a function can be crafted. I would suggest relying upon org-sort-entries and just append or :prepend the new capture item, but the choice is yours. If you need a special function, then consider posting a new question with details regarding what it is that you expect as a result. – lawlist May 16 '16 at 16:46
  • To access the todo list view type C-c a t assuming you bound org-agenda to C-c a. – kain88 May 16 '16 at 21:23

You can refer to the documentation for org-capture-templates (try C-h v org-capture-templates) for all the supported %-escapes. The relevant bit for your question:

  %t          Time stamp, date only.
  %T          Time stamp with date and time.
  %u, %U      Like the above, but inactive time stamps.

You want to use %u rather than %t if you want the time stamp to be inactive.

See the Org manual for more detail on the the different kinds of time stamps. A plain time stamp (%t) affects how Org displays the entry in agenda views, while an inactive time stamp (%u) does not.

  • I overlooked the %u. Thank you – kain88 May 16 '16 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.