I want to capture things with a deadline timestamp relative to the date that is open in my agenda view. How can I do that?

The %T template inserts today's date. I want a template that queries my agenda view for the date and uses that instead.

2 Answers 2


The current date in an agenda view is kept in the buffer-local org-starting-day. Use a sexp like %(format-time-string "%Y-%m-%d" (org-time-from-absolute org-starting-day)) in your capture template to insert a date string.


With the cursor on the desired date in the agenda view, press k (for kapture). This will cause anything referring to the current day (for example %T in a capture template) to refer to the date in the agenda instead.

  • In spacemacs, this is K (upper case) Oct 29, 2018 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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