Amy Grinn <grinn....@gmail.com> writes: >> This sounds like XY problem then. >> If the real problem you want to solve is fontification, we may instead >> adjust Org mode fontification of source blocks to exclude noweb >> references. > > I see a problem with multiple possible solutions, some more involved > than others. The org-babel-noweb-wrap-* variables are already > customizeable and, in researching a solution to this problem, I have > found users who set these variables on a file or directory-local level > already.
Yup. And most of these customizations are aiming to solve the fontification problem. If we did not have the problem to start with, re-defining the noweb wrap syntax would be unnecessary in many cases. > How much does org mode modify the fontification for an indirect buffer? > Without having looked into it, I assume not much or at all. > ... I think > that approach could be more complex, especially when dealing with a > theoretically infinite number of major modes. Org mode does not _currently_ modify the code. But that's actually wrong - things like escaped ,* or indentation sometimes also stay on the way and produce incorrect fontification. So, rewriting the fontification of src blocks to cleanup the code before fontification is long due. noweb references is just another manifestation of this problem. > Both solutions could be implemented at the same time. We could build on > the existing functionality of the wrap-end and wrap-start variables > while also looking at ways to modify the syntax highlighting without > user intervention. I am not in favor of adding features that aim to serve as workarounds to Org mode. -- 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>