"J.D. Smith" <[email protected]> writes:
> Instead I just reused the regexps `org-raise-scripts' uses, with
> `org-inside-regexp'. Seems to work OK; see/test new commit.
Thanks!
While testing, I found how I managed to reproduce the problem last time.
It is a bout the order of invocation.
If I do M-x org-inside-mode and *then* M-x org-toggle-pretty-entities,
the sub/superscripts do not get highlighted.
As for sub/superscripts inside LaTeX, things seem to work.
> To be honest, I find the sub/superscript support a little annoying,
> because of the difference between a_{b} and a_b, which /appear/ the same
> in the buffer, but behave subtly differently at their right boundary.
> All of our other entities have hidden contents both before and after the
> visible text, so this one stands out.
IMHO, it is no different from the example with links I pointed to
earlier:
- https://orgmode.org
- vs [[https://orgmode.org]]
> I've been thinking of gating the sub/super-script functionality behind a
> custom var. Maybe I'm being picky; users can set
> `org-use-sub-superscripts' to '{} if they hate "plain" sub-superscript
> after all. Thoughts?
My thinking is to have highlighting/cursor change even when there is
nothing hidden, in bare links/sub/superscripts as an option. It is
somewhat different from what you propose as I understand.
>> The best suggestion I have beyond command hooks is the approach we took
>> in `org-fold-catch-invisible-edits-commands' with user-customizeable set
>> of commands to advice.
>
> Oh boy. Better for users to just learn to toggle off unhiding before
> doing sensitive visual-column aligmnent operations I think.
Ok. Let's not dwell too much on this.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
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>