summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-05-04 09:53:46 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-05-05 17:47:30 +0200
commitd9c0a810f7728d38e79c7e2d4cb7135afd1a8e8e (patch)
tree92b1e401243f1358a49c7fa59e7488a48f298b3c
parent018ce94d88005dc28a634edf353096e3d4355566 (diff)
downloadorg-mode-d9c0a810f7728d38e79c7e2d4cb7135afd1a8e8e.tar.gz
ox-publish: Use file true name as reference
* lisp/ox-publish.el (org-publish-file): Use file true name as reference.
-rw-r--r--lisp/ox-publish.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 0b6aa69..a6c7c17 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -664,13 +664,13 @@ If NO-CACHE is not nil, do not initialize `org-publish-cache'.
This is needed, since this function is used to publish single
files, when entire projects are published (see
`org-publish-projects')."
- (let* ((project
+ (let* ((filename (file-truename filename)) ;normalize name
+ (project
(or project
(org-publish-get-project-from-filename filename)
(user-error "File %S is not part of any known project"
(abbreviate-file-name filename))))
(project-plist (cdr project))
- (ftname (expand-file-name filename))
(publishing-function
(pcase (plist-get project-plist :publishing-function)
(`nil (user-error "No publishing function chosen"))
@@ -678,7 +678,7 @@ files, when entire projects are published (see
(f (list f))))
(base-dir
(file-name-as-directory
- (expand-file-name
+ (file-truename
(or (plist-get project-plist :base-directory)
(user-error "Project %S does not have :base-directory defined"
(car project))))))
@@ -691,7 +691,7 @@ files, when entire projects are published (see
(car project))))))
(pub-dir
(file-name-directory
- (expand-file-name (file-relative-name ftname base-dir)
+ (expand-file-name (file-relative-name filename base-dir)
pub-base-dir))))
(unless no-cache (org-publish-initialize-cache (car project)))