The culprit in this case is the regular expression in org-emph-re
org-verbatim-re
, responsible for determining if a sequence of characters in the document is to be set verbatim or not.
org-verbatim-re is a variable defined in `org.el'.
Its value is
"([ ('"{]|^)(([=~])([^
,"']|[^
,"'].?(?:
.?){0,1}[^
,"'])3)([- .,:!?;'")}]|$)"
quotes and double quotes are explicitly forbidden inside verbatim characters =~
by
[^
,"']|[^
,"']
I found discussions dating back 3 years comming to the conclusion that you have to tinker with this regular expression and set the variable org-emph-re
/org-verbatim-re
to something that matches your wishes in your emacs setup (maybe a file local variable works as well). You can experiment by excluding double quotes from the excluding character classes and outside matches as in
"([ ('{]|^)(([*/_=~+])([^
,']|[^
,'].?(?:
.?){0,1}[^
,'])3)([- .,:!?;')}]|$)"
but looking at that regex, heaven knows what happens to complex documents -- you have to try...
Edit: as it happens, if I evalute the following as region, quotes inside =
are exported correctly, but nothing else is :-), I investigate further when I have more time.
(setq org-emph-re "([ ('{]|^)(([*/_=~+])([^
,']|[^
,'].?(?:
.?){0,1}[^
,'])3)([- .,:!?;')}]|$)")
Edit 2:: Got it to work by changing org.el
directly:
Change the line following (defvar org-emphasis-regexp-components
from '(" ('"{" "- .,:!?;'")}" "
,"'" "." 1)
to '(" ('{" "- .,:!?;')}" "
,'" "." 1)
and recompile org then restart emacs.
This was a defcustom
prior to the 8.0 release, it isn't anymore, so you have to live with this manual modification.
regards,
Tom