First of all thank you for your GTD tutorial, very pedagogic.
I am still learning to handle it and found that saving each time the different org files after refiling was breaking the workflow of the whole process.
Even though saving by hand is a way to make sure that you didn't make a mistake...
Here is how I have done to automatically save the files after refiling:
;; Automatically get the files in "~/Documents/org"
;; with fullpath
(setq org-agenda-files
(mapcar 'file-truename
(file-expand-wildcards "~/Documents/org/*.org")))
;; Save the corresponding buffers
(defun gtd-save-org-buffers ()
"Save `org-agenda-files' buffers without user confirmation.
See also `org-save-all-org-buffers'"
(interactive)
(message "Saving org-agenda-files buffers...")
(save-some-buffers t (lambda ()
(when (member (buffer-file-name) org-agenda-files)
t)))
(message "Saving org-agenda-files buffers... done"))
;; Add it after refile
(advice-add 'org-refile :after
(lambda (&rest _)
(gtd-save-org-buffers)))
First of all thank you for your GTD tutorial, very pedagogic.
I am still learning to handle it and found that saving each time the different org files after refiling was breaking the workflow of the whole process. Even though saving by hand is a way to make sure that you didn't make a mistake...
Here is how I have done to automatically save the files after refiling: