diff options
author | Arun Isaac | 2025-09-09 13:15:17 +0100 |
---|---|---|
committer | Arun Isaac | 2025-09-09 13:15:17 +0100 |
commit | 6f04ea1f3f7c2b6c4727210c492e293edd8a1823 (patch) | |
tree | b6b5e898f1c134f2e5faec6ecfdeb513c8ea056d | |
parent | b25a703572143b7f9cfc5f55704cd2c114b6adc3 (diff) | |
download | ennum-6f04ea1f3f7c2b6c4727210c492e293edd8a1823.tar.gz ennum-6f04ea1f3f7c2b6c4727210c492e293edd8a1823.tar.lz ennum-6f04ea1f3f7c2b6c4727210c492e293edd8a1823.zip |
Delete copy of tangled org file using unwind-protect.
unwind-protect is safer and ensures deletion even if there are non-local exits.
-rw-r--r-- | ennum.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ennum.el b/ennum.el index 6314a5c..12e04ce 100644 --- a/ennum.el +++ b/ennum.el @@ -501,9 +501,11 @@ result as a string." (expand-file-name (file-name-nondirectory interned-org-file) (ennum-setting :static-directory)))) - (ennum-copy interned-org-file post-file-copy) - (org-babel-tangle-file post-file-copy) - (delete-file post-file-copy))))) + (unwind-protect + (progn + (ennum-copy interned-org-file post-file-copy) + (org-babel-tangle-file post-file-copy)) + (delete-file post-file-copy)))))) (seq-mapcat 'ennum-publish-link (ennum-post-links post))))) (defun ennum-publish-generic (other-files-directory file) |