How to escape double quote?

后端 未结 4 1384
盖世英雄少女心
盖世英雄少女心 2020-12-19 10:45

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).

<
4条回答
  •  北海茫月
    2020-12-19 11:10

    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 .

提交回复
热议问题