Переглянути джерело

ox-publish: Consistently cache properties

* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' so that
caching keys do not depend on links in the file name.
Nicolas Goaziou 7 роки тому
батько
коміт
250b64b3cb
1 змінених файлів з 6 додано та 4 видалено
  1. 6 4
      lisp/ox-publish.el

+ 6 - 4
lisp/ox-publish.el

@@ -628,7 +628,8 @@ Return output file name."
 	       plist
 	       `(:crossrefs
 		 ,(org-publish-cache-get-file-property
-		   (expand-file-name filename) :crossrefs nil t)
+		   ;; Normalize file names in cache.
+		   (file-truename filename) :crossrefs nil t)
 		 :filter-final-output
 		 (org-publish--store-crossrefs
 		  org-publish-collect-index
@@ -1006,7 +1007,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 (plist-get info :input-file)))
+  (let ((file (file-truename (plist-get info :input-file))))
     (org-publish-cache-set-file-property
      file :index
      (delete-dups
@@ -1116,7 +1117,8 @@ 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
-   (plist-get info :input-file) :crossrefs
+   (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
    ;; `:internal-references', with references as strings removed.  See
@@ -1146,7 +1148,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 (org-export-string-to-search-cell search)))