bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11948: 24.1.50; word-wrap should allow wrapping at all breaking spac


From: Eli Zaretskii
Subject: bug#11948: 24.1.50; word-wrap should allow wrapping at all breaking space characters, not just space and tab
Date: Mon, 16 Jul 2012 22:47:09 +0300

> Date: Mon, 16 Jul 2012 19:21:00 +0100
> From: Reuben Thomas <address@hidden>
> Cc: address@hidden
> 
> On 16 July 2012 17:05, Eli Zaretskii <address@hidden> wrote:
> >
> > A prerequisite for doing something about this is to decide which
> > characters should allow breaking the line.  Is there some guidance in
> > the Unicode standard or elsewhere about this?  If not, we will have to
> > decide on our own.
> 
> The Unicode line breaking algorithm is probably the place to go:
> 
> http://unicode.org/reports/tr14/

Thanks, but that's not what I meant.  Implementing UAX#14 in full is
an effort similar (although smaller) to what was required for
implementing UAX#9, the Unicode Bidirectional Algorithm.  The main
problem is that, like with UAX#9, the algorithms in UAX#14 are
specified assuming that text is processed for display in batches.  By
contrast, the Emacs display engine, which implements word-wrap,
examines and processes characters one by one.  So one needs to
"serialize", so to speak, the UAX#14 algorithms so that its decisions
could be made on a character-by-character basis.

I think just supporting more characters from LineBreak.txt on which to
wrap should be a good start, and much easier than implementing UAX#14.
Even for that, we will need an efficient char-table for the related
properties, probably via the uniprop_table machinery, like what bidi.c
uses.  Otherwise, referencing the ordinary char-tables of character
properties for each character we display could slow down redisplay too
much.





reply via email to

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