Ar an séú lá is fiche de mí na Samhain, scríobh Ben Wing:
this is what i call the "russian c-x problem". at one
point i had
worked out what the correct thing to do is, and there are various
comments to this effect in XEmacs; but i never finished it. it looks
like aidan went ahead and implemented it, though, right, aidan?
Yes. I’ve never tested the the Win32 support, though--it looks like your
implementation is complete, but I couldn’t say if it works or not.
[...] note also that this algorithm *does* use the locale of the
current
buffer; this is certainly possible under windows, where there is an
explicit api to query both the physical and logical keyboard.
The X11 side of things doesn’t. It just supplies Qwerty as an alternative.
Win32 locale support in general is much superior, and providing the same
level of functionality in pure X11 is just impossible. There is no locale ->
key layout mapping available, for a start.
it also seems that alphabetic and non-alphabetic keys should
(perhaps)
behave differently.
What I take from this response from Paul --
>>-- If you see M-; listed as a key binding, is the first thing
that
>>occurs to you to type Alt+Shift+8? Or would you go for Alt+ж, since ж
>>is where ; is on the US keyboard? Should we accept both?
>
>I can't say which would be the most natural thing to hit, because few apps
>but Emacs use such extravagant shortcuts.
is that we have to support this processing for punctuation as well as for
alphanumeric characters. If he doesn’t know which would be the most natural
thing to hit, then people in general will hit both, and as well as that,
lots of ASCII punctuation just isn’t available on a Russian keyboard. (This
position is different from what I thought when I implemented the X11 support
in the first place, btw.) It’s not that reasonable to make forward-word
available by default but not ispell-word, just because ispell-word uses the
dollar sign.
[..] (with alphabetic keys, it is semi-feasible to search the
keyboard in
front of me to find the keys, but this is just impossible for
punctuation.)
This is my experience too, strangely enough, since there’s no reasonable
ground for punctuation being much harder to find than letters.
Okay, I’ve just posted code to xemacs-patches(a)xemacs.org that takes into
account what Paul said, and moves the fallback mapping from raw X11 keycodes
to the US layout to hardware-specific Lisp, which is where it should be. I’d
love to have some commentary on it.
>The only plausible generic solution I can think of is to track
the
>layout for each buffer separately. This may be very difficult to
>impossible to implement with external layout switching. And that's
>precisely the reason why I prefer to use Emacs' own input methods
>switched by `C-\'. This means that I have to use different layout
>switching methods in Emacs and elsewhere, but the advantages are more
>important for me.
I get what you mean there; there are three or four input methods that I
regularly use, and being able to switch to a specific one with C-u C-\,
without messing around with character maps, makes my life significantly
easier. Indeed, I find myself typing IPA into XEmacs and pasting it into
other applications--admittedly I do use a local hack to get the glyphs to
display, so in general it’s not any better than GNU Emacs for this.
--
I AM IN JAIL AND ALLOWED SEND ONLY ONE CABLE SINCE WAS ARRESTED WHILE
MEASURING FIFTEEN FOOT WALL OUTSIDE PALACE AND HAVE JUST FINISHED COUNTING
THIRTY EIGHT THOUSAND FIVE HUNDERED TWENTY TWO NAMES WHOS WHO IN MIDEAST.