Browse Source

ox-publish: Fix last commit

* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' instead of
`expand-file-name'.

Do not preserve symbolic links when a unique identifier is needed,
e.g., when storing or retrieving file properties from cache.
Nicolas Goaziou 2 years ago
parent
commit
1562d4e293
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lisp/ox-publish.el

+ 4 - 4
lisp/ox-publish.el

@@ -575,7 +575,7 @@ Return output file name."
 	       `(:crossrefs
 		 ,(org-publish-cache-get-file-property
 		   ;; Normalize file names in cache.
-		   (expand-file-name filename) :crossrefs nil t)
+		   (file-truename filename) :crossrefs nil t)
 		 :filter-final-output
 		 (org-publish--store-crossrefs
 		  org-publish-collect-index
@@ -1025,7 +1025,7 @@ PARENT is a reference to the headline, if any, containing the
 original index keyword.  When non-nil, this reference is a cons
 cell.  Its CAR is a symbol among `id', `custom-id' and `name' and
 its CDR is a string."
-  (let ((file (expand-file-name (plist-get info :input-file))))
+  (let ((file (file-truename (plist-get info :input-file))))
     (org-publish-cache-set-file-property
      file :index
      (delete-dups
@@ -1134,7 +1134,7 @@ a plist.
 This function is meant to be used as a final output filter.  See
 `org-publish-org-to'."
   (org-publish-cache-set-file-property
-   (expand-file-name (plist-get info :input-file))
+   (file-truename (plist-get info :input-file))
    :crossrefs
    ;; Update `:crossrefs' so as to remove unused references and search
    ;; cells.  Actually used references are extracted from
@@ -1165,7 +1165,7 @@ references with `org-export-get-reference'."
 		 search
 		 file)
 	"MissingReference")
-    (let* ((filename (expand-file-name file))
+    (let* ((filename (file-truename file))
 	   (crossrefs
 	    (org-publish-cache-get-file-property filename :crossrefs nil t))
 	   (cells