babel: load-file works for symlinks -- Thanks to Martin Kühl

This commit is contained in:
Eric Schulte 2010-02-04 09:43:11 -07:00
parent fd6cc29909
commit 131441dbd2
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ file using `load-file'."
(flet ((age (file) (flet ((age (file)
(time-to-seconds (time-to-seconds
(time-subtract (current-time) (time-subtract (current-time)
(sixth (file-attributes file)))))) (sixth (file-attributes
(file-truename file)))))))
(let* ((base-name (file-name-sans-extension file)) (let* ((base-name (file-name-sans-extension file))
(exported-file (concat base-name ".el"))) (exported-file (concat base-name ".el")))
;; tangle if the org-mode file is newer than the elisp file ;; tangle if the org-mode file is newer than the elisp file