2013ko abenudak 17an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Aaron Ecay writes: > >> Since the present syntax is inadequate for representating these >> sequences, the new syntax will have to break backwards compatibility >> somehow in order to fix the problem. So there’s no long-term harm in >> having a short-term kludge that will eventually disappear. > > OK. Thanks for the patch. > > Though, I think you are patching the wrong location. Modifying > `org-element--get-next-object-candidates' is expensive. It would be > better to patch `org-element-sub/superscript-successor' and make it > ignore underline matches with brackets followed by an underscore > character and resume searching. We (perhaps) have to worry about cases like: '_foo bar_ . Here it’s not enough to look at the character immediately following the (possible) subscript, but rather to take into account the full logic of org-emph-re. But now that I think about it, this is the only correct way, since what org-element--get-next-object-candidates sees is limited by the restriction. The attached patch implements this. It also updates the fontification to match (by calling out to the parser, so there are potential performance issues although with the cache it will hopefully not be an issue in practice), and notes the new heuristic in the manual. The test suite passes.