0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-17 06:36:27 +00:00

Fix bug with emphasis-like expressions in example blocks

Martin Skjaeveland writes:

> Hi all,
>
> when I import the file
>
> --8<---------------cut here---------------start------------->8---
> -----------------
> | grandmother   |
> =================
> | sim:Jackeline |
> | sim:Mona      |
> -----------------
> --8<---------------cut here---------------end------------->8---
>
> using the command
>
> #+INCLUDE "grandmothers.txt" example
>
> and export to latex it turns into
>
>
> \begin{verbatim}
> -----------------
> | grandmother   |
> \texttt{===============}
> | sim:Jackeline |
> | sim:Mona      |
> -----------------
> \end{verbatim}
>
>
> I would like to remove \texttt{ }. I have tried different export
> option settings, but I can't make it work.
>
This commit is contained in:
Carsten Dominik 2009-11-05 07:48:07 +01:00
parent dd5b4d286e
commit 72b860d2c2

View file

@ -1688,9 +1688,10 @@ from the buffer."
"Mark verbatim snippets with the protection property."
(goto-char (point-min))
(while (re-search-forward org-verbatim-re nil t)
(add-text-properties (match-beginning 4) (match-end 4)
'(org-protected t org-verbatim-emph t))
(goto-char (1+ (match-end 4)))))
(org-if-unprotected
(add-text-properties (match-beginning 4) (match-end 4)
'(org-protected t org-verbatim-emph t))
(goto-char (1+ (match-end 4))))))
(defun org-export-protect-colon-examples ()
"Protect lines starting with a colon."