From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: POLL: make C-x o transient Date: Fri, 05 Feb 2021 09:34:25 +0000 Message-ID: <5588fb2580cf77301ab1@heytings.org> References: <2EFBBE54-62F4-4373-82D6-DC8750B648BA@kuaishou.com> <87eei9xb5r.fsf@mail.linkov.net> <87sg6m5mjs.fsf@mail.linkov.net> <8735ykc37u.fsf@mail.linkov.net> <938445fec66b0cdb0c4e@heytings.org> <87y2gchcpm.fsf@posteo.net> <9031b3534b1379ca1f96@heytings.org> <5588fb25809fad66f986@heytings.org> <8735yanbau.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32631"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 05 10:35:58 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l7xWt-0008EU-6U for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Feb 2021 10:35:55 +0100 Original-Received: from localhost ([::1]:49994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7xWs-0005ex-6Z for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Feb 2021 04:35:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7xVW-0004g9-TW for emacs-devel@gnu.org; Fri, 05 Feb 2021 04:34:30 -0500 Original-Received: from heytings.org ([95.142.160.155]:37608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7xVU-0006MO-VB; Fri, 05 Feb 2021 04:34:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1612517666; bh=mBhLr/ChU52lFxySdcidQ/HANMWCHNo1907nYTSraMs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=pEdXhshIPMUoDy4U9xUfShfDnxqqZY9ATHJ14U5QpWHxhfyTTUK/I8A5oKcASC7iH 4pe7SRjsC8NUmuW2S0K1bUgZE4iJyvUyiz62vupaiBpcuOj4JICaplIMY8hWyw+2T4 9LOQAid7fQ+CJBigLrTe2exS9BNh3LOmgGB1wYCg7WlQqjgMKV3BHmiW5hIyUdwGrs Hjardzb0wikQ8wIYgwpG5NAAWnKpgObQ7aEmS8Xg0ERqWbnm7awd8mjhpAhAoUCxxf BWtPmoGYrjnlkMZ9P2VP3EejEY8sNaw8VktlbBY0EnkmiONppjo8eU4BdA4pWIOX1F frugp1UXglW4w== In-Reply-To: <8735yanbau.fsf@mail.linkov.net> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263960 Archived-At: >> An example: calling (other-window 1) four times followed by >> (other-window -1) one time requires: >> >> C-x o C-x z z z C-- C-x z : nine keys pressed, control key pressed and >> released three times >> >> C-x o C-= C-= C-= C-- C-= : seven keys pressed, control key pressed >> twice and released pressed only once > > This needs to be compared also with the last letter typed: > > C-x o o o o O : six keys pressed, control key pressed once and released > pressed once > ... and shift key pressed and released once. ... and possibly pressing C-g to exit the transient keymap. That solution has a number of limits: 1. it is not general, you have to define specific keys for each case 2. the keys that are bound are not self-inserting anymore, you may have to exit the transient keymap manually with C-g 3. there are even cases where this is not possible to use it, for example, how would you repeat C-x C-t? 4. you cannot freely change the argument between two repetitions