reddit / emacs

Orgmode: How to re-update the next scheduled time and properties:LAST_REPEAT if the text is directly edited?

FreeAd7233 ยท 2022-09-02 04:58
Suppose I have a typical recurring task: ```org * TODO test SCHEDULED: <2022-09-02 Fri 00:50 .+3h> :PROPERTIES: :LAST_REPEAT: [2022-09-01 Thu 21:50] :END: - State "DONE" from "TODO" [2022-09-01 Thu 21:50] - State "DONE" from "TODO" [2022-09-01 Thu 20:50] - State "DONE" from "TODO" [2022-09-01 Thu 19:50] ``` then for some reason (maybe at the time I complete the task I cannot use emacs), so I have to mark the task as `DONE` later, then I want to directly change the plaintext of the time I complete the task, for example, I want to change the time the latest completion to be `21:20`, then the org file will becomes this: ```org * TODO test SCHEDULED: <2022-09-02 Fri 00:50 .+3h> :PROPERTIES: :LAST_REPEAT: [2022-09-01 Thu 21:50] :END: - State "DONE" from "TODO" [2022-09-01 Thu 21:20] - State "DONE" from "TODO" [2022-09-01 Thu 20:50] - State "DONE" from "TODO" [2022-09-01 Thu 19:50] ``` However, the `PROPERTIES:LAST_REPEAT` and the next SCHEDULED time will not update after I change the last time I complete the task. Is there any way to update it rather than I also manually change the `LAST_REPEAT` and next SCHEDULED time? For other operations org offers, like breaking down task, if you manually edit the text of checkboxes, you can use `#'org-update-check-box-count` to make the task progress to be correct. For calculating time interval for a timer, you can have `#'org-evaluate-time-range` if you directly change the plaintext of the time you start and end a task. Is there any similar command for changing the next SCHEDULED time and LAST_REPEAT property?