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: Tue, 02 Feb 2021 21:11:28 +0000 Message-ID: <9031b3534b1379ca1f96@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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPEA0FMNNO" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38774"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: chad Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 02 22:13:16 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 1l72z5-0009wC-7u for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 22:13:15 +0100 Original-Received: from localhost ([::1]:40922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l72z4-0001md-Ak for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 16:13:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72xX-0000U6-AM for emacs-devel@gnu.org; Tue, 02 Feb 2021 16:11:39 -0500 Original-Received: from heytings.org ([95.142.160.155]:33892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l72xT-00043u-7N for emacs-devel@gnu.org; Tue, 02 Feb 2021 16:11:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1612300288; bh=wP/5DWzytjoJxuxWJYHC+3nUsOOGG1H7mkYrpkmCmQo=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Ld+KwVy4TrKz1n1T2v7qQxDbJwsC2JyGT91E402clpvsLLmwhZoTkU/8N/ODLTAUc dD7/oIpdewcntz7B5d3m6knGSYLk4M7petwtmh9OkNX7Qe83mksQySUM2Ex8dF4MET 0wt+K5U1u3581AUCgkocgjgWm/Qhywn3RuQ+UzVMYFzlbeX7z8fCUEETIXOc8xhSxH cbczSGOYZrgBy/yGgDa+BmeKMhifNr/asaGPB3wMuh69TfrMvYHRdLBPhvo5dLgkEw pEDFbHXMaZd30Pb8rzJb6Xabse4nfG8kAoAtj3C9AUYByInelQ7LTkH3zQ3+BEfh3e nlsQYMnV7orEA== In-Reply-To: Content-ID: <9031b3534b8e8f22513d@heytings.org> 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:263755 Archived-At: --ZPEA0FMNNO Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <9031b3534b1c168e3ee2@heytings.org> >=20 > Gregory suggested "C-=3D" as a potential binding with the benefit that it= =20 > falls right next to "C--" for inverting, on US/UK keyboard layouts. > My C-=3D suggestion was not for transient keymaps, it was for the global=20 map. Using C-=3D in transient keymaps does not make sense, as RMS said. > > (There is a parallel discussion about binding "C-=3D" to #'repeat at the= =20 > top level, which is interesting but has some logistical issues, and is a= =20 > separate proproal.) > It is not a parallel discussion, it is an attempt to solve the OP's=20 problem in a different, more general, and IMO simpler, way. In short, the= =20 two competing approaches to solve the OP's problem are: 1. For each command that should become repeatable, define a transient=20 keymap that is activated when the command has completed, with keys to=20 repeat that command or its "opposite". Which keys should be used for that= =20 purpose is not clear: the last key and its shifted version (for example=20 "o" and "O"), or "." and ",", or the last key its corresponding opposite=20 command key (for example "n" and "p" after "M-g"), or... 2. Create a unified way to repeat the last command with its argument (=C3= =A0 la=20 "." command in Vi), by binding the existing "repeat" command to a single=20 key binding, for example "C-=3D". With this it also becomes possible to=20 change the argument between two repetitions, possibly to something=20 different than "opposite". No command must be changed. --ZPEA0FMNNO--