From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#48472: [FR] A small suggestion for repeat-mode Date: Tue, 18 May 2021 00:24:23 +0300 Organization: LINKOV.NET Message-ID: <871ra5xalk.fsf@mail.linkov.net> References: <87bl9atpen.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37037"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 48472@debbugs.gnu.org To: Gustavo Barros Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 00:31:52 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 1lilmB-0009XI-9l for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 00:31:51 +0200 Original-Received: from localhost ([::1]:49290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lilmA-0001tj-BU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 May 2021 18:31:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lillP-00014K-Nc for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 18:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lillP-000672-Em for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 18:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lillP-0003oF-BP for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 18:31:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 May 2021 22:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48472 X-GNU-PR-Package: emacs Original-Received: via spool by 48472-submit@debbugs.gnu.org id=B48472.162129061914576 (code B ref 48472); Mon, 17 May 2021 22:31:03 +0000 Original-Received: (at 48472) by debbugs.gnu.org; 17 May 2021 22:30:19 +0000 Original-Received: from localhost ([127.0.0.1]:53988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lilkh-0003n2-7o for submit@debbugs.gnu.org; Mon, 17 May 2021 18:30:19 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:57063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lilkZ-0003lF-0C for 48472@debbugs.gnu.org; Mon, 17 May 2021 18:30:11 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id D8A861C0004; Mon, 17 May 2021 22:30:04 +0000 (UTC) In-Reply-To: <87bl9atpen.fsf@gmail.com> (Gustavo Barros's message of "Sun, 16 May 2021 17:05:52 -0300") 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:206751 Archived-At: > I've just taken notice of the recently introduced `repeat-mode', in > `repeat.el', and welcome it. > > I haven't yet tried it out, since I'm running on 27.2, but I understand > what it does, and how. I'll definitely use it when Emacs 28 comes, since > I have some commands for which I use current `repeat.el' functionality to > do something equivalent in my setup, and the new mode makes this much more > convenient, so thank you (Juri) for adding it. > > But I write to give one small suggestion to the mode. Namely that an > option be added to make the transient keymap expire after a (configurable) > timeout. The idea is that the repeating last key press is very handy > indeed, but if you happen to stop at a repeatable key, stop some "idle" > time (thinking, reading, whatever) and then hit the key again, it might not > be what was actually meant. In other words, besides `repeat-exit-key', > some idle time after the last repeatable key may serve as a good indicator > for breaking the repetition chain. Thanks for the suggestion, this is a very good idea. > As far as I can see, this should not be particularly complicated, since > `set-transient-map' returns an "exit function" which could be stored and > ran on a timer, as appropriate. An "exit function" returned by `set-transient-map' is a clever thing, without such returned function it would be more complicated to implement. I quickly tried it out, and it works indeed. > And, of course, it can be optional. A new user option could be named `repeat-exit-timeout'.