Tony Zorman <tony.zor...@tu-dresden.de> writes: >> Because Org mode syntax is not LaTeX and `texmathp' assumes that we are >> inside >> LaTeX buffer. So, we first check using Org syntax whether the point is >> inside latex fragment in Org sense. > > But isn't what Org calls LaTeX math pretty equivalent to what would > count as the same in a LaTeX buffer? From a quick scan of texmathp.el, I > couldn't actually see a hard-dependency on a TeX-derived mode at all. I > wouldn't really care about this so much, but the fact that the Org > variant just misreports the position is a bit unfortunate, in my > opinion.
No, there is a difference. For example, something like \alpha is a valid Org mode entity. Without `org--math-p' advice, if you do "`a" in Org buffer with org-cdlatex-mode, you will see $\alpha$ inserted. With the advice, just \alpha will be inserted. There are likely other similar edge cases. We would not choose to advice third-party function without a strong reason. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>