aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/elisp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-07-25 02:41:43 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-07-25 02:41:43 +0100
commit4f934a8a7cf312512d8aa3b0fefa5915744941c3 (patch)
treea8003eb0f80b6f8cd925e107374ab91cc3988ffd /Emacs/.config/emacs/elisp
parent571a896f7c2ccda279866f6ebe807c0d526bcc61 (diff)
downloaddotfiles-4f934a8a7cf312512d8aa3b0fefa5915744941c3.tar.gz
dotfiles-4f934a8a7cf312512d8aa3b0fefa5915744941c3.tar.bz2
dotfiles-4f934a8a7cf312512d8aa3b0fefa5915744941c3.zip
(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.
Diffstat (limited to 'Emacs/.config/emacs/elisp')
-rw-r--r--Emacs/.config/emacs/elisp/literate.el2
1 files changed, 2 insertions, 0 deletions
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)