0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

org.el (org-babel-load-file): Don't get fooled by symlinks

* lisp/org.el (org-babel-load-file): Don't get fooled by symlinks.
This commit is contained in:
Bastien 2020-02-12 17:43:02 +01:00
parent c39c5c6559
commit fa24cd541d

View file

@ -216,7 +216,8 @@ and then loads the resulting file using `load-file'. With
optional prefix argument COMPILE, the tangled Emacs Lisp file is
byte-compiled before it is loaded."
(interactive "fFile to load: \nP")
(let* ((tangled-file (concat (file-name-sans-extension file) ".el")))
(let* ((file (file-truename file))
(tangled-file (concat (file-name-sans-extension file) ".el")))
;; Tangle only if the Org file is newer than the Elisp file.
(unless (org-file-newer-than-p
tangled-file