[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 05:03:31 -0400

> From: David Kastrup <address@hidden>
> Date: Sun, 31 Jul 2011 09:59:17 +0200
> Cc: address@hidden

I've removed the mew list from the CC, as this doesn't seem to be
related to mew.

> > Yes, the name is always `.mew-summary'.  I've CCed the mew mailing
> > list so that the author of mew gets informed.  It should be
> > straightforward to add a proper call to `bidi-paragraph-direction'
> > within the next mew release.
> I think that is a bottomless pit.  I consider it nonsensical to treat a
> block of aligned lines as one large paragraph where one would need to
> find out the paragraph direction of the whole.

The paragraph direction is determined by the paragraph beginning, not
by all of it.  The first "strong directional" character in the
paragraph, either a left-to-right character or a right-to-left
character, will determine the base direction of that paragraph.  E.g.,
a single Latin letter is all that's needed for determining that the
paragraph direction is left-to-right.

> It might be nice to have the same default paragraph direction in the
> whole "paragraph" for alignment purposes

Alignment is not the issue here; correct display as expected by users

> but it is nonsensical to wait for the paragraph to complete.

Emacs doesn't wait for the paragraph to complete, to determine its
base direction.  All it needs is its beginning; one character is

The use case that Werner reported was with point being near the end of
a very large buffer that doesn't have paragraph breaks.  When point
was at the beginning of that same large buffer, cursor motion was
responsive enough.  That's because, when redisplay is called in the
middle of a paragraph, and bidi-paragraph-direction is nil, Emacs
searches back to the beginning of the paragraph to determine its
direction, and in this case it would search back to the beginning of
this very large buffer.

> With a bit of luck, the alignment uses display properties (because
> otherwise proportional fonts are raining on the parade), and in the
> presence of a :space display property or what our aligning properties
> were called

Unless I misunderstand you, the display properties are irrelevant to
the issue at hand, as is alignment in general.

> I think that the paragraph direction should be determined
> at the end of the first line, rather than the whole "paragraph".

As explained above, it is determined at the first strong directional
character, much sooner than the end of the first line.

> It might also be reasonable to set the paragraph boundary detection
> regexps to nil in buffers where no paragraphs will ever be found

How to detect these buffers?  If we can detect them reliably, we could
probably always set their paragraph direction to left-to-right, which
would be a better default than a locale-dependent one (see below).

> and let bidi revert to a (locale-dependent?) default direction for
> such buffers.

Experience shows that some people who need the bidirectional display
work in locales that have nothing to do with R2L scripts.  So I think
it would be a bad misfeature to do what you suggest (IIUC).  At least
we should consider better alternatives before we give up in this way.

reply via email to

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