From 488eea6d256ab4060ac92423536cee9d153e0263 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 12 Dec 2012 10:57:34 +0100 Subject: [PATCH] org-latex.el: Escape raw path when exporting links to files. * org-latex.el (org-export-latex-links): Escape raw path when exporting links to files. Thanks to John Smith for reporting this. --- lisp/org-latex.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 9ce84f14e..a53470df8 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -2291,14 +2291,13 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (concat type ":" raw-path)) ((equal type "file") (if (and (org-file-image-p - (expand-file-name - raw-path) + (expand-file-name (org-link-unescape raw-path)) org-export-latex-inline-image-extensions) - (or (get-text-property 0 'org-no-description - raw-path) + (or (get-text-property 0 'org-no-description raw-path) (equal desc full-raw-path))) (setq imgp t) - (progn (when (string-match "\\(.+\\)::.+" raw-path) + (progn (setq raw-path (org-link-unescape raw-path)) + (when (string-match "\\(.+\\)::.+" raw-path) (setq raw-path (match-string 1 raw-path))) (if (file-exists-p raw-path) (concat type "://" (expand-file-name raw-path))