diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-05-05 23:22:23 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-05-05 23:22:23 +0200 |
commit | 250b64b3cb9a538b853312b787f98015747b2a01 (patch) | |
tree | b588b796192075310741e1a51c8cac44ad18fcd5 | |
parent | d9c0a810f7728d38e79c7e2d4cb7135afd1a8e8e (diff) | |
download | org-mode-250b64b3cb9a538b853312b787f98015747b2a01.tar.gz |
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.
-rw-r--r-- | lisp/ox-publish.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index a6c7c17..bd059e8 100644 --- a/lisp/ox-publish.el +++ b/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))) |