commit f4b1e329fc6e3878bfff648649f5d654b1f2808c
parent 92b8d2a10c52fbaef681fea6b97a7dd20f642a8f
Author: Spencer Williams <spnw@plexwave.org>
Date: Sun, 6 Jul 2025 18:00:09 -0400
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.
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -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