Browse Source

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.
Bastien 5 years ago
parent
commit
fa24cd541d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -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