Amy Grinn <grinn....@gmail.com> writes: >> 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. > > I think we're talking past each other a little. I'm not talking about > changing the text content of a src block, I'm talking about modifying > the syntax table of a major mode such as sh-mode to ignore or handle > <<noweb>> syntax in an "edit-special" buffer. That was my > interpretation of your suggestion of using fontification to solve this > issue. And if that's the case, I foresee a lot of edge cases for > modifying the display of major modes.
That's not what I had in mind. I thought of resolving/replacing noweb references before fontifying the code. That way, the major mode for src block will simply not see <<noweb>> text and will not be confused. >> I am not in favor of adding features that aim to serve as workarounds to >> Org mode. > > This discussion is not about whether to allow users to modify noweb > syntax. That feature is already a part of Org, well documented, and > utilized. The feature request I'm making is to allow that modification > to be done on a per-block level. Sure, but I wanted to hear why such feature is useful in practice. Your example with fontification is not something I consider as a good justification for adding a new feature. You another email provides a better justification though. -- 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>