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.
This commit is contained in:
Nicolas Goaziou 2017-05-05 23:22:23 +02:00
parent d9c0a810f7
commit 250b64b3cb
1 changed files with 6 additions and 4 deletions

View File

@ -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)))