瀏覽代碼

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

Eric Schulte 15 年之前
父節點
當前提交
131441dbd2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      contrib/babel/lisp/org-babel-tangle.el

+ 2 - 1
contrib/babel/lisp/org-babel-tangle.el

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