diff options
author | Spencer Williams <spnw@plexwave.org> | 2025-07-06 18:00:09 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2025-07-06 20:10:34 -0400 |
commit | f4b1e329fc6e3878bfff648649f5d654b1f2808c (patch) | |
tree | 4aa77c45e4ed6a18038ec023373e2ab1f5c6a167 | |
parent | 92b8d2a10c52fbaef681fea6b97a7dd20f642a8f (diff) |
Aggressively delete old HTML files on export
This is to avoid keeping around old HTML files that are no longer
wanted after changing seam-export-alist.
-rw-r--r-- | lisp/seam-export.el | 1 | ||||
-rw-r--r-- | lisp/seam.el | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lisp/seam-export.el b/lisp/seam-export.el index d0f59cc..71a7921 100644 --- a/lisp/seam-export.el +++ b/lisp/seam-export.el @@ -314,6 +314,7 @@ notes)." (error "Nothing to export. Please configure `seam-export-alist'.")) (dolist (dir (seam-note-subdirectories)) (dolist (file (directory-files dir t seam-note-file-regexp)) + (seam-delete-html-files-for-note file) (seam-export-note file)))) (provide 'seam-export) diff --git a/lisp/seam.el b/lisp/seam.el index 193e8e5..2824fc7 100644 --- a/lisp/seam.el +++ b/lisp/seam.el @@ -310,8 +310,8 @@ completion prompt is given to choose the type." (defun seam-post-save-or-rename (old new &optional previous-links-from-file slug-or-title-changed) (unless (string= old new) - (seam-update-links old new) - (seam-delete-html-files-for-note old)) + (seam-update-links old new)) + (seam-delete-html-files-for-note old) (seam-export-note new) (let* ((current-links (seam-get-links-from-file new)) (added-links (cl-set-difference current-links |