Hello, Aaron Ecay <aarone...@gmail.com> writes:
> I agree. Do you think it is possible to solve the problem while > preserving the fact that underscore is used for both subscript and > underline? It seems very difficult. We could give priority to underline when there are no curly brackets, priority to subscript otherwise. It sounds overly complicated though. > When I think about the question, I think probably what is needed is a > representation where object boundaries are delimited by one well-defined > pair of delimiters, like {} in latex or <> in html (well, in html they > delimit tags, but the principle is the same: only one pair). Then we > don’t have to worry about escape syntax for many characters, or > characters with multiple possible interpretations (or how many lines > org-emph-re is allowed to match across, or ...). > > But that is just one idea I have had. You must have thought about it > more, so maybe you have others. > >> >> I'm strongly against behavioral parts in Org syntax (even though the >> ship probably has sailed long ago). Org mode is bound to Emacs, but Org >> format should be platform independent. > > Org syntax can be un-configurable even if org-element.el implements a > (configurable) superset of it. org-element.el is meant to implement _exactly_ Org syntax. Not a superset of it. > Given that the use-subscript variable exists (and without taking into > account more systemic solutions as discussed above), I’m arguing that > it is cleaner to implement it in org-element, rather than in two > separate places (in the regex-based old-style parsing code in org.el > and in ox.el; there’s also one reference to the variable in > org-table.el(!)) > > Phrased in other terms, it makes no sense (in the context of Org-Mode, > not platonic Org Syntax) for org-element to insist that "a_b" is a > subscript, if org-use-sub-superscripts = > org-export-with-sub-superscripts = nil. Again, `org-use-sub-superscripts' is, at the moment, a visual-only variable. My plan is to move it out, not in. Regards, -- Nicolas Goaziou