Using org-capture-templates to schedule a TODO for the day after today

隐身守侯 提交于 2019-12-03 05:33:23

Working off Juancho's answer* I was able to come up with a valid timestamp.

The following will provide an org-created timestamp.

"[...]SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+1d\"))" 

org-read-date generates a date and +1d shifts it one day in the future. nil t tells it to not include HH:MM time and to convert the date into an internal TIME representation.

org-insert-time-stamp takes TIME and converts it to a timestamp using the normal org-mode format (including weekday abbreviation)

*The answer does not work because <%(org-read-date nil nil \"+1d\")>" results in <YYYY-MM-DD>


Update

A timestamp of is now valid in Org mode (it was added to allow for entering timestamps from outside org-mode where they would not automatically be able to calculate the day of the week I believe).

Therefore Juancho's answer would work as well.

This should work for your template string:

"\n\n** TODO %?\nSCHEDULED: <%(org-read-date nil nil \"+1d\")>"

org-read-date generates a timestamp; +1d means tomorrow.

kevin zeng

And further more, if you want a repeatable template, which generates a time stamp like:

SCHEDULED: <2012-08-17 Fri .+1d>

you may use this one:

SCHEDULED:%(org-insert-time-stamp (org-read-date nil t) nil nil nil nil \" .+1d\")
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!