Hello, I've been archiving tasks automatically using `org-after-todo-state-change-hook' but I've been recently bit with a note (entering a todo state configured with '@') being placed where the task was before its archival. This patch aims to offer a way to defer the archival after the note is stored. Actually, I am using it like this: #+begin_src elisp (add-to-list 'org-after-todo-state-change-hook (lambda () ;; States configured without mandatory note (when (member org-state '("DONE")) (my/org-roam-archive-to-today)) ;; States configured with mandatory note (when (member org-state '("CANCELLED" "READ")) (add-to-list 'org-after-note-stored-hook 'my/org-roam-archive-to-today)))) #+end_src With `my/org-roam-archive-to-today' removing itself from `org-after-note-stored-hook'. Hopefully I did not miss an existing way to do this. Regards, Joris