1

I want to capture several tasks that will repeat annually from the date on which they are captured.

So, I did:

(setq org-capture-templates '(("a" "TODO Item that repeats annually" entry (file+headline "~/Documents/todo.org" "Annual") "* TODO %?\n SCHEDULED: %t"))) 

This adds a TODO with scheduled date as today. How do I get +1y added to scheduled?

On a more general note, what should the capture template be with schedule for tomorrow, tomorrow recurring annually, etc.?

1 Answer 1

4

You can achieve that using template expansion. As %(EXP) will expand a lisp expression, you can take advantage of it.

Rewriting the template's scheduled part to this will do it

SCHEDULED: %(concat \"<\" (format-time-string \"%Y-%m-%d\") \" +1y\>\") 

Surely there is a more general "org-way" to do it if you dig enough into timestamp objects, but I haven't been able to figure how to make it work with org-insert-timestamp as PRE and POST are inserted out of timestamp;

Also, you can use org-insert-time-stamp's (stated but undocumented) EXTRA argument to pass it, so:

SCHEDULED: %(org-insert-time-stamp nil nil nil nil nil \" +1y\") 

will do the same. For more complex date choices than current date probably using org-read-date will help.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.