Compare commits

...

2 Commits

Author SHA1 Message Date
Collin J. Doering 2e6497db81
emacs-configuration: Add emacs-nov-el
Note: this package is not yet explicitly configured within emacs configuration.
2024-04-20 10:59:08 -04:00
Collin J. Doering 238a4f774e
emacs-configuration: Adjust init.el to handle symlinks differently
* user-config/emacs/.emacs.d/init.el: Prior to moving emacs configuration to the guix store,
this issue didn't occur; however, after doing so, ~/.emacs.d/config.el is a symlink to a
store file. Because org-babel-load-file resolved symlinks before comparing their timestamps,
and config.org is now a symlink to a store file with an unchanging timestamp, config.org
changes never get tangled. To resolve this, instead we compare the symlink age of config.org
to the tangled file.
2024-04-20 09:57:29 -04:00
2 changed files with 16 additions and 1 deletions

View File

@ -178,6 +178,7 @@ single certifcate used for local development with caddy.")
"emacs-multiple-cursors"
"emacs-nix-mode"
"emacs-no-littering"
"emacs-nov-el"
"emacs-org"
"emacs-org-contrib"
"emacs-org-download"

View File

@ -30,4 +30,18 @@
; executable (new in org 9.6)
(org-confirm-babel-evaluate nil))
(when (file-exists-p config)
(org-babel-load-file config t)))
(when (or (not (file-exists-p el))
(time-less-p
(file-attribute-modification-time (file-attributes el))
(file-attribute-modification-time (file-attributes config))))
(org-babel-tangle-file config el)
;; Make sure that tangled file modification time is
;; updated even when `org-babel-tangle-file' does not make changes.
;; This avoids re-tangling changed FILE where the changes did
;; not affect the tangled code.
(when (file-exists-p el)
(set-file-times el))
(byte-compile-file el)
(load-file (byte-compile-dest-file el))
(message "Compiled and loaded %s" el))))