>>>> "Kazz" == Kazuyuki IENAGA
<ienaga(a)jsys.co.jp> writes:
Kazz> It is very old article... But I saved this because I have an
Kazz> idea. SL Baur <steve(a)xemacs.org> writes:
> This is a known problem. I don't think XEmacs can survive
any
> of the Input Method servers dying.
Kazz> No. As I said before (maybe), the current code lacks of
Kazz> register/unregister the input method. Instead of the
Kazz> implementation, input-method-xlib just opens XIM and attach
Kazz> it to the context. (It is very same with Motif, but Motif
Kazz> does this smart internally)
It's not clear to me what happens in your method if you have just
typed half of a kana in romaji.... Once the input context is open, I'm
not sure what happens if the connection dies. The man page does not
specify error returns for X*LookupString. If the call blocks, we're
screwed anyway.
This clearly reduces the possibility of the holocaust scenario, though.
Kazz> Instead of just opening the XIM, we should set the code to:
Kazz> 1. when opening the context, we should set the callback
Kazz> for XIM that if the XIM is available for the context, use
Kazz> it.
Are you suggesting that the context should be opened and closed on
every toggle of the input method? This reduces the chance of dying
much more, but I don't know how inefficient it is.
Kazz> XRegisterIMInstantiateCallback
Kazz> 2. when invoking the XIM, we should register the
Kazz> callback that if the XIM is unavailable, then release the
Kazz> XIM.
Kazz> XUnregisterIMInstantiateCallback
Kazz> I'd been having this idea 1 year, but I have no coding power
Kazz> and the enough time for this. Any Xpert?
This looks like it solves part of the problem, but we should be doing
something to integrate XIM with other methods anyway. XIM is the only
major input protocol left that hasn't been LEIM-ized. (I guess the
iso-*.el methods haven't been, but that's going to be trivial. (push
todo "LEIM-ize iso-*.el methods") :-)
What is needed is to move control of initialization and closing of XIM
methods to the Lisp level so that XIM methods get opened and closed
when we do select-input-method.
I'm pretty sure Martin Buchholz has been thinking about this, too.