Right, sorry... F12 is in the hebrew bindings, and all it does is bind to "language hebrew" (which toggles back and forth between Hebrew and the primary language, as set in the preferences; note that this is *not* the document language, but the default language). I'm not sure what switching from the dialog does, maybe that's why we're seeing different behavior. The normal way to switch is using the "language" command though: you can either add it to your key bindings, or type it in directly in the minibuffer.
Ic. It probably is doing something else than the dialog. The dialog calls the toggle functions in Text3.cpp.
On top of those, we can continue experimenting with the EPM --- though again, I'm not sure anymore that it's really necessary, and I also agree somewhat with the issues that Andre' raised...I think you are right. EPM can come later. We should put in your patch ASAP. But there is one thing missing I think, have to try first to be sure: take "abc[ WERBEH]ghi". Can you type space then in front of the "g"?Good question --- but it actually seems to be working; it looks like the space magic kicks in, and switches the space's language. Then the existing EPM, I guess, removes the new space just typed in. But the result is that it's working correctly. Also note that the situation probably wouldn't arise in the first place, because as soon as 'g' was typed, the space magic would already have changed the previous space back to LTR.I expect you can't we at least needs the part of the patch from theinsertChar method which makes this possible. With that addition your patch has my OK.I suggest keeping the attached patch at the *bottom* of the stack now --- I think we all more or less agree with it, and as soon as we get the OKs, it can be committed (I'd still like to hear from Ran and Guy and any other Bidi users about it, though). So the attached is to be applied to a clean svn tree.With the upper addition and another OK by somebody else, I commit it...
In fact it works, more or less by luck. This is what is happening: You start with: abc[_WERBEH]|ghi, logically abcHEBREW_|ghiSo by the insertion condition of spaces you are not able to add another space. But you code will change the language of the space in front, i.e. you get
abc[WERBEH]_|ghiThen the insertion condition evaluated to false, hence the new space is dropped.
Is this what you want? I think adding a condition to your code to only handle characters other than space would be correct.
But now take: abc|[WERBEH_]ghi, logically abc|_HEBREWghiYou cannot type in the space now without the EPM eating it up on the next key press, altough you should be able to.
So, these two things must be fixed before it can go in IMO. I posted relaxed EPM conditions here somewhere in thread.
Stefan
PGP.sig
Description: Signierter Teil der Nachricht