From f51f51e8a6a891baab2c48481fec1f4b6bf4adf1 Mon Sep 17 00:00:00 2001 From: TEC Date: Sun, 25 Oct 2020 17:02:42 +0800 Subject: [PATCH] Make a backup of the source file; accidents happen --- org-pandoc-import-transient.el | 1 + 1 file changed, 1 insertion(+) diff --git a/org-pandoc-import-transient.el b/org-pandoc-import-transient.el index 67344e5..bdb406a 100644 --- a/org-pandoc-import-transient.el +++ b/org-pandoc-import-transient.el @@ -133,6 +133,7 @@ actions that may undesirably trigger the file watcher.") (start-time (time-to-seconds (current-time))) (org-pandoc-import-transient--currently-processing t)) (unless (plist-get file-info :initialised) + (copy-file source-file (concat source-file ".backup") nil t) (delete-file org-file) ; to avoid the overwrite prompt (message "Initialising...") (org-pandoc-import-to-org nil source-file org-file t)