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

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

Re: Swapping default input method: why so complicated?


From: Ilya Zakharevich
Subject: Re: Swapping default input method: why so complicated?
Date: Wed, 08 Dec 2010 15:36:08 -0000
User-agent: slrn/0.9.8.1pl1 (Linux)

On 2010-11-15, Ted Zlatanov <tzz@lifelogs.com> wrote:
> I usually use `C-u M-x toggle-input-method' which queries and has a
> history of past choices.  But it would be nice if there was a
> `cycle-input-method' that cycled among several choices (or,
> alternatively, `default-input-method' could be allowed to be a list and
> then `toggle-input-method' could select the first element of the list
> and then rotate the list).

Currently, I do not see how a pre-packaged solution may fit all.  For
the sake of argument, let's consider how I use "input methods" (or
equivalents).  I do not use Emacs for most of my editing - but I
suspect that nowadays, when internationalization eventually starts to
work, with good configuration Emacs might be capable enough for my
editing needs.

For most primitive situations, "toggling" input method is a good
paradigm - but I would need a two-level toggle: two choices for Latin
(US and international) and two choices for Cyrillic (GOST and
foreign).  (A "sane" international input method [one which is
equivalent to US without pressing AltGr] would reduce it to 3, but it
is not available [outside of Emacs] on many architectures...)

So in this situation one needs two-level toggle: one between targets
(Latin/Cyrillic), another between flavors for each target.  This gives
one of the Emacs interface designs: it should be easy to allow people
to code such multi-level switches programmatically, without a need to
write monstrosities similar to what I did.

=======================================================

Experience shows that for me, most other input needs would
be satisfied by suitable prefix keys (for the duration of next
character) for input of greek, hebrew, half a dozen of flavors of
math.  The current Emacs approach (where one needs to type the long
name of the encoding) does not fit the bills.  (Outside Emacs, I use
F-keys to switch to one-char input methods; so F5 b inputs beta, and
F6 + would input "union sign".  But in Emacs, they already bound for
other repetitive stuff...)

Other people would switch between more "long-stretch targets" than
two.  For them, toggle would not be enough...  I still have no idea
how the good UI for this would look like.  One approach would be to
have a single prefix key mean "switch for one char", and double key to
mean "switch until further notice" (so F5 F5 would switch to greek
"target").  But this would not work well if switching is done by
key-sequences...  One can bind some key to mean "make this input
method stick" (so, for example, f5 f12 would stick to greek input
method).

Ilya


reply via email to

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