summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-12 17:43:02 +0100
committerBastien <bzg@gnu.org>2020-02-12 17:43:02 +0100
commitfa24cd541d51f386fe89c8bb47b41273b19abf9a (patch)
treedcc18adc0899869b811cd9763c63732e20b8364c
parentc39c5c65594f2af4c04b9ea6f66abf77c5d09187 (diff)
downloadorg-mode-fa24cd541d51f386fe89c8bb47b41273b19abf9a.tar.gz
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.
-rw-r--r--lisp/org.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 60dd869..dc75b2e 100644
--- a/lisp/org.el
+++ b/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