From: Aaron Ecay <aaronecay@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [parser] subscripts and underlines interacting badly
Date: Thu, 12 Dec 2013 02:56:23 -0500 [thread overview]
Message-ID: <87r49ik0qw.fsf@gmail.com> (raw)
In-Reply-To: <8761qvxg2o.fsf@gmail.com>
2013ko abenudak 11an, Nicolas Goaziou-ek idatzi zuen:
>
> Aaron Ecay <aaronecay@gmail.com> writes:
>
>> I have found one case where both match, but an underline is intended.
>> Are there any reverse cases, i.e. where both match but a subscript is
>> intended?
>
> I don't know. Perhaps something as convoluted as:
>
> A'_{a_-1}
Oh, yes. Very clever. Unfortunately, it means that a fix, even a
temporary one, cannot be just to prioritize underline over subscript as
I proposed. =/
> As a short term solution, it can be implemented (it's probably just
> a matter of reordering successors calls). But in the long run, we really
> need to define properly both syntax.
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.
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. 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.
Thanks,
--
Aaron Ecay
next prev parent reply other threads:[~2013-12-12 7:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 2:30 [parser] subscripts and underlines interacting badly Aaron Ecay
2013-12-11 8:22 ` Nicolas Goaziou
2013-12-11 18:36 ` Aaron Ecay
2013-12-11 20:55 ` Nicolas Goaziou
2013-12-12 7:56 ` Aaron Ecay [this message]
2013-12-12 17:33 ` Nicolas Goaziou
2013-12-12 19:42 ` Aaron Ecay
2013-12-12 20:47 ` Nicolas Goaziou
2013-12-16 3:15 ` Aaron Ecay
2013-12-16 3:24 ` [PATCH] quick patch to org-habit todo state keywords Ted Wiles
2013-12-16 4:27 ` Aaron Ecay
2013-12-17 16:57 ` [parser] subscripts and underlines interacting badly Nicolas Goaziou
2013-12-18 6:57 ` Aaron Ecay
2013-12-18 15:01 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r49ik0qw.fsf@gmail.com \
--to=aaronecay@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).