diff --git a/global.org b/global.org index 25528f7..ef9d78c 100644 --- a/global.org +++ b/global.org @@ -1404,6 +1404,17 @@ (add-hook 'auto-save-hook 'org-save-all-org-buffers-except-current) #+end_src + Also, we need to trigger saving once the state changes, so that we + are always able to sync the right state; saving runs with a timer + so that it is not triggered e.g. when cycling through states. The + problem with the current implementation is that we do not know + which buffer has been modified if the state has been changed using + the agenda, which is kind of the point… + #+begin_src emacs-lisp + (add-hook 'org-after-todo-state-change-hook + (lambda () + (when buffer-file-name (save-buffer-with-timer 5)))) + #+end_src *** Reverting stuff from orgzly #+begin_src emacs-lisp (defun org-revert-all-orgzly-buffers (&optional ALL)