From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Newsgroups: gmane.emacs.bugs Subject: bug#52245: Wishlist: cycle input methods Date: Sat, 11 Dec 2021 20:07:55 +0000 Message-ID: <878rwqj46c.fsf@gmail.com> References: <874k7rdn17.fsf@gmail.com> <838rx2an87.fsf@gnu.org> <87r1aucc61.fsf@gmail.com> <875ys0flvg.fsf@gmail.com> <871r2oml7o.fsf@gmail.com> <83v900xru6.fsf@gnu.org> <87ilvv5i1s.fsf@ankarstrom.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: 52245@debbugs.gnu.org To: John =?UTF-8?Q?Ankarstr=C3=B6m?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 11 21:09:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mw8gJ-0004Rk-Ii for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 21:09:19 +0100 Original-Received: from localhost ([::1]:47512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mw8gI-0001eB-CP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 15:09:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mw8g2-0001e2-O4 for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 15:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mw8g2-00028o-G1 for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 15:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mw8g2-0000TG-8Z for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 15:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Dec 2021 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52245 X-GNU-PR-Package: emacs Original-Received: via spool by 52245-submit@debbugs.gnu.org id=B52245.16392532851741 (code B ref 52245); Sat, 11 Dec 2021 20:09:02 +0000 Original-Received: (at 52245) by debbugs.gnu.org; 11 Dec 2021 20:08:05 +0000 Original-Received: from localhost ([127.0.0.1]:50042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw8f6-0000S0-Nh for submit@debbugs.gnu.org; Sat, 11 Dec 2021 15:08:05 -0500 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:36734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw8f4-0000RW-Mi for 52245@debbugs.gnu.org; Sat, 11 Dec 2021 15:08:03 -0500 Original-Received: by mail-wm1-f43.google.com with SMTP id i8-20020a7bc948000000b0030db7b70b6bso11396392wml.1 for <52245@debbugs.gnu.org>; Sat, 11 Dec 2021 12:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Zwzolb+AroPkJj2cYRalFmnBcfbVa+FuDMiF5Wxfy9U=; b=I3bLvyFL/gP+JWvErG6YGYMmXkdWHRvyB4THtHx42LZSna4GRLMHCPYN/QYpcRoXiu MN1DMr7MDy/+LW7sP40YjfKfV1tT230/X0VdaFmcDFrgpNYKjN+6ufkbTSBgTLQ8DNrc f2dtFBoJ9zQ/VFe2w7ARpZWD9nG4zFkbCJN5xdo+nEel2ybdOh9bmu4RpD1UJrrtGgnO inz4uCKshGixuwznOh0NpvVCcsMwH4/RgY/S/6ajZJSWf0wyhexJT+DX4+WviUgK+c8T WESbvfZ68iJkcbCc15DlUoayJFt7QCmZOunj2Ev827+KPqWXQAzrkF1AHTf4o5hoHZFx xkpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Zwzolb+AroPkJj2cYRalFmnBcfbVa+FuDMiF5Wxfy9U=; b=ZgZqM3fHuqsKS2oCLt7JQ2bCXKCig10OgbV/UI4/0oFDahItJguR2gLs3pmZ3y1jGU hxQkd/FPopxB93e3cmz/bcYYLzBaqZS61hNr4COJ6WlpnpjA9USIjVdS8TNaEbNkWHVM ayoaFOlCJV1ZhbmzkEE6RWDMkEasHp+F7I8LXJN5ci+X3UiphRlJn4RgpGuXPtd9vZva sJANGZAgn1df1X2zPsD891Ck7QkmbxOuU/t5eitEU5cOdwjwdiJDxo3hv+6S5GOU/LWz aJ1dIg1ZChQwrSYevhpPlsOp6+FUQ+cR5psELzJb7y7sXccsYXh4S4kp+LUyk+EQNmLY hgEw== X-Gm-Message-State: AOAM532nLx946nMJGZmtPSf+DMWyGFxPc+BfK9AdeZqyUq4Byj3N6WWF 5SwRhAGpEjTVfPKSTLvc70+3FiuSadU= X-Google-Smtp-Source: ABdhPJxlnFm6xyHNRMf7f/YBvVg4L3DZPloNQo91RKdNgfP+kPL3a17CZ/3u4SckNEfbO9h0oqxbSA== X-Received: by 2002:a7b:c10a:: with SMTP id w10mr25789500wmi.183.1639253276945; Sat, 11 Dec 2021 12:07:56 -0800 (PST) Original-Received: from guix-xps13 ([2001:818:daa9:6700:462d:384e:6de8:4a1c]) by smtp.gmail.com with ESMTPSA id o5sm5657916wrx.83.2021.12.11.12.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Dec 2021 12:07:56 -0800 (PST) In-Reply-To: <87ilvv5i1s.fsf@ankarstrom.se> ("John =?UTF-8?Q?Ankarstr=C3=B6m?="'s message of "Sat, 11 Dec 2021 15:31:59 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222143 Archived-At: John Ankarstr=C3=B6m writes: > Eli Zaretskii 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=C3=A9 A. Gomes "Free Thought, Free World"