GNU bug report logs - #52245
Wishlist: cycle input methods

Previous Next

Package: emacs;

Reported by: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>

Date: Thu, 2 Dec 2021 15:31:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: André A. Gomes <andremegafone <at> gmail.com>
To: John Ankarström <john <at> ankarstrom.se>
Cc: 52245 <at> debbugs.gnu.org
Subject: bug#52245: Wishlist: cycle input methods
Date: Sat, 11 Dec 2021 20:07:55 +0000
John Ankarström <john <at> ankarstrom.se> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> The use case that I have in mind is this: even if the user customized
>> the list of input methods to include more than just one, there could
>> be situations where the user needs to use just one input method when
>> typing.  In such situations, it would be good to have a way of
>> toggling, like we do now, instead of cycling through all the other
>> methods.
>>
>> Any reasonable solution to this use case would be welcome.  I'm
>> working with systems which allow you to do something like that, and it
>> frequently annoys me to have to cycle through all the keyboard layouts
>> I defined, just to be able to toggle between US English and some other
>> language.  So I wish that Emacs didn't have such an annoying problem,
>> if possible.
>
> IIRC Windows 10 handles this by implementing the input method list as a
> stack of sorts, so that Win-Space selects an input method similarly to
> how Alt-Tab selects a window. Pressing Win-Space once is a toggle, but
> pressing Win-Space consecutively (while holding Win) cycles through all
> input methods.
>
> Emacs could do something similar. A single C-\ could toggle between the
> two input methods at the top of the list, whereas any number of
> consecutive C-\'s could cycle the list. The implementation would just
> need to check last-command.

Could be a possibility indeed.

Let me raise a concern on this topic.  In Emacs, nil is what we call the
default OS-level IM (or the one dictated by the keyboard firmware).  But
this presents an issue since it both means "the nil input method", which
in itself might be english-us, and that `default-input-method' is
unbound.

I propose thinking about what we have today (no IM cycling, just the
toggle) and see if we need changes before moving on with the more
general case.

Let's think about a simple case - using 2 IMs.  Today you can't easily
go from input method A to B with C-\, unless either A or B is nil.  This
is because `default-input-method' is a buffer-local variable, and it
changes as the user selects IMs.

I suggest that `default-input-method' should be set to "default" and
shouldn't be mutated.  When already in use, fallback to the IM history
ring.  Yes, this requires some re-writing.


--
André A. Gomes
"Free Thought, Free World"




This bug report was last modified 3 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.