From 93fc26e4263ef2e884595b0c3b7364a502c662a1 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 7 Oct 2018 19:19:33 +0200 Subject: [PATCH] [Org] Remove old diary file before exporting new one --- site-lisp/db-org.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index e594dea..1c27ad0 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -845,6 +845,9 @@ This is done only if the value of this variable is not null." ;; actual export; calls `org-release-buffers’ and may thus close ;; buffers we want to keep around … which is why we set ;; `org-agenda-new-buffers’ to nil + (when (file-exists-p org-icalendar-combined-agenda-file) + (delete-file org-icalendar-combined-agenda-file) + (sit-for 3)) (org-icalendar-combine-agenda-files) (message "Exporting diary ... done.")))))))