diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-03-08 11:48:56 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-03-08 11:48:56 +0100 |
commit | 6747bf3de6fe0d52526d59d336c6dda0c0c84b1f (patch) | |
tree | 7943fc872fe6b2bb3bc876df4c5dc2d3ea4e7aa2 | |
parent | 2f48603d7130f5a5dfe3785e7fff8994c5ca186d (diff) | |
parent | 2eda74285e082ccdb4d9413ae66606fce49a1368 (diff) | |
download | org-mode-6747bf3de6fe0d52526d59d336c6dda0c0c84b1f.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-beamer.el | 10 | ||||
-rw-r--r-- | lisp/ox-latex.el | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 0cbe2c7..82651d3 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -1122,9 +1122,13 @@ Return output file name." ;; working directory and then moved to publishing directory. (org-publish-attachment plist - (org-latex-compile - (org-publish-org-to - 'beamer filename ".tex" plist (file-name-directory filename))) + ;; Default directory could be anywhere when this function is + ;; called. We ensure it is set to source file directory during + ;; compilation so as to not break links to external documents. + (let ((default-directory (file-name-directory filename))) + (org-latex-compile + (org-publish-org-to + 'beamer filename ".tex" plist (file-name-directory filename)))) pub-dir)) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index aba34c2..2727359 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3696,9 +3696,13 @@ Return output file name." ;; in working directory and then moved to publishing directory. (org-publish-attachment plist - (org-latex-compile - (org-publish-org-to - 'latex filename ".tex" plist (file-name-directory filename))) + ;; Default directory could be anywhere when this function is + ;; called. We ensure it is set to source file directory during + ;; compilation so as to not break links to external documents. + (let ((default-directory (file-name-directory filename))) + (org-latex-compile + (org-publish-org-to + 'latex filename ".tex" plist (file-name-directory filename)))) pub-dir)) |