From 4f934a8a7cf312512d8aa3b0fefa5915744941c3 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 25 Jul 2024 02:41:43 +0100 Subject: (Emacs/elisp/literate)+delete the old output before making a new one org-babel-tangle-file works doesn't alter timestamps if it thinks the Emacs Lisp file it could produce isn't any different from the one already there. We've already done the stat check, and don't particularly care for what org-babel-tangle-file thinks. Hence we should delete the file to force org-babel-tangle-file to generate a new file. --- Emacs/.config/emacs/elisp/literate.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index f515f8c..9e429a6 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -98,12 +98,14 @@ (let ((output-file (+literate/org-to-el org-file))) (when (file-newer-than-file-p org-file output-file) (message "[Literate]:\tTangle(%s)->%s" org-file output-file) + (delete-file output-file) (org-babel-tangle-file org-file)))) (defun +literate/byte-compile-if-old (el-file) (let ((output-file (+literate/el-to-elc el-file))) (when (file-newer-than-file-p el-file output-file) (message "[Literate]:\tByteCompile(%s)->%s" el-file output-file) + (delete-file output-file) (byte-compile-file el-file)))) (defun +literate/load-org-file (org-file) -- cgit v1.2.3-13-gbd6f