From: "André A. Gomes" <andremegafone@gmail.com>
To: "John Ankarström" <john@ankarstrom.se>
Cc: 52245@debbugs.gnu.org
Subject: bug#52245: Wishlist: cycle input methods
Date: Sat, 11 Dec 2021 20:07:55 +0000 [thread overview]
Message-ID: <878rwqj46c.fsf@gmail.com> (raw)
In-Reply-To: <87ilvv5i1s.fsf@ankarstrom.se> ("John Ankarström"'s message of "Sat, 11 Dec 2021 15:31:59 +0100")
John Ankarström <john@ankarstrom.se> writes:
> Eli Zaretskii <eliz@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"
next prev parent reply other threads:[~2021-12-11 20:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 15:30 bug#52245: Wishlist: cycle input methods Tor Kringeland
2021-12-02 15:49 ` Robert Pluim
2021-12-02 18:14 ` Eli Zaretskii
2021-12-03 8:42 ` Robert Pluim
2021-12-07 15:57 ` André A. Gomes
2021-12-07 16:30 ` Robert Pluim
2021-12-07 17:11 ` Eli Zaretskii
2021-12-08 9:40 ` Robert Pluim
2021-12-08 13:26 ` Eli Zaretskii
2021-12-08 13:44 ` Robert Pluim
2021-12-08 14:29 ` Eli Zaretskii
2021-12-08 14:51 ` Robert Pluim
2021-12-11 14:31 ` John Ankarström
2021-12-11 20:07 ` André A. Gomes [this message]
2021-12-23 18:02 ` Juri Linkov
2021-12-23 18:27 ` Eli Zaretskii
2021-12-23 18:45 ` Juri Linkov
2021-12-07 15:51 ` André A. Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rwqj46c.fsf@gmail.com \
--to=andremegafone@gmail.com \
--cc=52245@debbugs.gnu.org \
--cc=john@ankarstrom.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).