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: Sat, 30 Jan 2021 14:13:25 +0000 Message-ID: <5bbae1bd19ade73394fb@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: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 30 15:15:11 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 1l5r1q-0008Od-Uu for ged-emacs-devel@m.gmane-mx.org; Sat, 30 Jan 2021 15:15:10 +0100 Original-Received: from localhost ([::1]:58076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5r1q-0005Dl-17 for ged-emacs-devel@m.gmane-mx.org; Sat, 30 Jan 2021 09:15:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5r0D-0004Gv-9G for emacs-devel@gnu.org; Sat, 30 Jan 2021 09:13:29 -0500 Original-Received: from heytings.org ([95.142.160.155]:58366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5r0B-0006BZ-KO for emacs-devel@gnu.org; Sat, 30 Jan 2021 09:13:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1612016005; bh=8BnwwHMsqgYJ9IIUR8HFAfKucXkb8QuTO159H1Rq0KU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=XAWcZxLO0BLqRr5GYa4jyZczBp7/8XMCGADV+wPKhwnUW8wiagIoHsT8IRrd5Opge FNFzA0fJG9pzGE1jYzE97jTG2OOb2KPQwPIqSCwmWkTOlp4Q5pBZbtVyNk4Tiewi/o 2yPJObA5mzcygdMPfQ4vUrS/CYG/2D8DJnC0YCJ+26LhG+8Cg28X3S7h8NX68yg5Z1 cMax9wCAaN1EBdbAgIMf1z6+zFRe3Ok0d6QSXRV1b++n5a7sRgBpv2cBVtnHkrv+lJ pS3ZyxINT0G+c77YAxrX0H/O3wANeHKJ25t8gT6eYcR2/4+LaoZrceANaKlOmUfda3 4V3OFsUaZq3dg== In-Reply-To: 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:263612 Archived-At: >>> It is to bind C-= to the existing "repeat" command, >> >> FWIW, I agree that `repeat` deserves a single-key bindings. >> But I don't think `C-=` can be it, and I don't have a counter-offer. > > 1. Why is it important to save one keystroke, just to initiate > repetition? > > What's important is to be able to repeat using a simple, single > keystroke. But to initiate repetition it's not important to use a > single keystroke (IMO). > As I already said twice, it is important because otherwise you cannot change the prefix argument between two repetitions, which is a very useful (it not necessary) feature for a repeat command. Suppose you have repeat bound on C-=. Say you have ten frames, you want to switch to another one, you type C-x 5 o C-= C-= C-= C-= C-= C-=, and you realize that you pressed '=' once too much: you just have to type C-- C-=, without even releasing the control modifier, and you're in the frame you wanted. Another reason (mentioned by Sean Whitton) is that repeating with the last key of a keystroke leads to commands being called when what you want to do is to type the character. With what you suggest, say you have two windows side-by-side, you want to shrink the current window a bit, you type C-u C-x {, and you now want to type '{': you have to remind that you need to quit the transient keymap with C-g before typing '{'. > > 2. That said, for _specific commands_, which are already bound to keys, > I think it's very helpful for some such commands to themselves be > repeatable. > That requires a lot more changes: it is necessary to adapt each individual command, including user-defined commands, to make it repeatable.