From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [parser] subscripts and underlines interacting badly Date: Thu, 12 Dec 2013 18:33:27 +0100 Message-ID: <87txeevus8.fsf@gmail.com> References: <87ppp415n4.fsf@gmail.com> <87bo0nu79v.fsf@gmail.com> <87haaf1bgi.fsf@gmail.com> <8761qvxg2o.fsf@gmail.com> <87r49ik0qw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrA8T-0007yu-OZ for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 12:33:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrA8L-0002UZ-CE for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 12:33:17 -0500 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:34759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrA8L-0002UT-4J for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 12:33:09 -0500 Received: by mail-ea0-f182.google.com with SMTP id a15so395046eae.13 for ; Thu, 12 Dec 2013 09:33:08 -0800 (PST) Received: from selenimh ([91.224.148.150]) by mx.google.com with ESMTPSA id g47sm68491832eeo.19.2013.12.12.09.33.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2013 09:33:07 -0800 (PST) In-Reply-To: <87r49ik0qw.fsf@gmail.com> (Aaron Ecay's message of "Thu, 12 Dec 2013 02:56:23 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Hello, Aaron Ecay 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=E2=80=99t 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=E2=80=99m 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=E2=80=99s 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 =3D > org-export-with-sub-superscripts =3D nil. Again, `org-use-sub-superscripts' is, at the moment, a visual-only variable. My plan is to move it out, not in. Regards, --=20 Nicolas Goaziou