FlySpell in Org-Mode recognize latex syntax like auctex

和自甴很熟 提交于 2019-12-05 06:38:23

flyspell internally uses ispell-mode. To change the way that ispell parses files set the variable ispell-parser to 'tex.

(add-hook 'org-mode-hook (lambda () (setq ispell-parser 'tex)))
legoscia

Most likely auctex is using flyspell-mode-predicate to define what portions of the buffer shouldn't be spellchecked. (This answer shows how to do something similar for MoinMoinWiki.) org-mode already has such a function, org-mode-flyspell-verify, which apparently doesn't work properly for you... A quick look at the source suggests that org-remove-flyspell-overlays-in should be called for buffer portions containing code samples etc.

Sorry about the handwavy answer; marking this as community wiki to invite improvements.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!