[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bidi-display-reordering is now non-nil by default

From: Eli Zaretskii
Subject: Re: bidi-display-reordering is now non-nil by default
Date: Sun, 31 Jul 2011 08:22:39 -0400

> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Sun, 31 Jul 2011 13:07:13 +0200
> Eli Zaretskii <address@hidden> writes:
> >> So we are apparently searching for the paragraph beginning of a
> >> humongous paragraph for each keystroke.
> >
> > In the case in point, yes.  Also for each cursor motion command.
> Can't this information be cached somehow?

I think it would be a very complicated caching, because you cannot
determine whether you are still inside the same paragraph without
finding the beginning and the end of that paragraph.  Since Emacs is
an editor, i.e. most buffers get their text modified, you'd need to
update your notion of the paragraph beginning and end very frequently,
so you are back at the same problem: the need to find the paragraph
beginning as a prerequisite for correct redisplay (but now you also
need to find its end, which will eat up more cycles).

Even with paragraph beginning and end in hand, there are still
complications, because inserting a character at the paragraph
beginning can change its base direction.  And that character does not
have to be the very first character of the paragraph, it can be
preceded by any number of so-called "neutral" and "weak" characters,
like punctuation and whitespace, that have no directionality of their
own, but instead take the direction of surrounding "strong"

Doing this correctly and efficiently will require non-trivial
infrastructure, which is not something to consider when the pretest is
about to start, I think.

So I'd rather we didn't implement such a cache if it can be avoided.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]