One relevant point from there to here, though: I'm not sure you'll be able to do away with bidi entirely. For example, as I suggest in that thread, for "visual mode" I think we'll have to use vis2log and log2vis. And once we're using anything Bidi related in cursor movement, we'll have to solve the problem for that anyway; so is it still worth going through with all this? It'll just make us have the bidi logic in *two* places instead of one, and in a slightly different form, to boot...

We have two places already and with the current implementation we will always have them. But reducing the number of references to the bidi object makes it much simpler because the Font information for RTL is much more stable.

There are basically two kinds of information about bidi we use at the moment:
1) RTL or LTR at one position
2) relations between visual <-> logical positions

For 1 the font information is enough, so no bidi object whatsoever needed. This information is in the font of each character. Of course also boundary detection is part of 1.

For 2 of course we need more global knowledge of a complete line. And here we cannot avoid the Bidi class. But the place where 2 is used are only a little part of the LTR/RTL related code. So reducing the bidi accesses to case 2 is already a big step forward in code quality.

It's hard to follow multiple patches at once, especially if they are not totally separated in a logical way (for example, I'm pretty sure that nobidi.patch includes a change which actually belongs in rtlepmnobidi.patch --- specifically the change at hunk @@ -1161,7 +1153,8 @@ in Text2.cpp) --- and they also don't apply cleanly over each other because of that...

I very warmly recommend using "quilt" (the best place I've found for getting started with it is here: http://www.coffeebreaks.org/ blogs/wp-content/archives/talks/2005/quilt/quiltintro-s5.html) --- I only started using it about a month ago, and I already can't understand how one can develop code without it. It is a wonderful tool aimed specifically at making it easier to handle multiple patches. It'll take you at most a few days to get used to, and it makes life so much easier. There are also a few alternatives mentioned, I haven't tried them myself, though...

Sounds interesting. Thanks! Will look into it.

Stefan

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to