George Pearson <[email protected]> writes:
> To keep my master org file tidy, I want to automatically archive each
> level 2 headline when I mark it done.
>
> This works great using org-after-todo-state-change-hook, EXCEPT when
> the headline has a repeater. Then org-entry-is-done-p returns TRUE
> even though the headline will be resurrected.
You can use `org-get-repeat' to check if the timestamp of the current
entry contains a repeater. So the function you add to
`org-after-todo-state-change-hook' could contain an additional check
along these lines:
(unless (org-get-repeat)
(org-archive-subtree))
Does this help?
Regards,
Christian