LaTeX export: Fix protection bug

Sebastian Rose writes:

> The following code does not work as expected, when exported to PDF:
>
> => --->8----------------------------->8----------------------------->8---
> * Image basics
>
>  Images are inserted into an Org file in a fashion similar to links:
>  : [[file:///home/sebastian/develop/org/org-mode-unicorn.png]]
>
> <= ---8<-----------------------------8<-----------------------------8<---
>
> Result:
>
>  The last line is exported as:
>
>  \href{file:///home/sebastian/develop/org/org-mode-unicorn.png}{nil}
>
>
> Expected result:
>
>  I expect the last line to be exported as fixed width text.
>
This commit is contained in:
Carsten Dominik 2009-11-10 08:48:40 +01:00
parent dd9a94b844
commit 80b81a168e
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-11-10 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-links): Check for protectedness
in the last matched character, not after the match.
* org-datetree.el (org-datetree-find-date-create): Respect
restriction when KEEP-RESTRICTION is set.
(org-datetree-file-entry-under): New function.

View File

@ -1536,7 +1536,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"Convert links to LaTeX."
(goto-char (point-min))
(while (re-search-forward org-bracket-link-analytic-regexp++ nil t)
(org-if-unprotected
(org-if-unprotected-1
(goto-char (match-beginning 0))
(let* ((re-radio org-export-latex-all-targets-re)
(remove (list (match-beginning 0) (match-end 0)))