In org mode, if I want to format text a monospace verbatim, i.e. ~...~
, if it is inside quotes: ~\"...\"~
, it is not formatted (left as is).
I've met similar problem, and thanks @chaiko for a basic solution. However, @chaiko's solution only work for org-mode's fontification, it doesn't affect org-export
. To get correct exported document, you need to do some more extra hack to org-mode's parser by (org-element--set-regexps)
.
So the full code snippets should be something like:
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n\r")
(custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
(org-element--set-regexps)
I've integrated this to my oh-my-emacs project: https://github.com/xiaohanyu/oh-my-emacs/blob/e82fce10d47f7256df6d39e32ca288d0ec97a764/core/ome-org.org#code-block-fontification .