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#51281: 28.0.60; repeat-mode issues Date: Wed, 01 Dec 2021 19:58:49 +0200 Organization: LINKOV.NET Message-ID: <86mtlk8aw6.fsf@mail.linkov.net> References: <87tuhdijk3.fsf@mail.linkov.net> <87y26ny56p.fsf@mail.linkov.net> <87pmrfo67f.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3352"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 51281@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 01 19:02:16 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 1msTvs-0000g4-8I for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 19:02:16 +0100 Original-Received: from localhost ([::1]:34840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msTvr-0006ze-0z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 13:02:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msTve-0006yt-LJ for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 13:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msTve-0004Ml-Cl for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 13:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msTve-0004Bv-4z for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 13:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Dec 2021 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51281 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51281-submit@debbugs.gnu.org id=B51281.163838168514302 (code B ref 51281); Wed, 01 Dec 2021 18:02:02 +0000 Original-Received: (at 51281) by debbugs.gnu.org; 1 Dec 2021 18:01:25 +0000 Original-Received: from localhost ([127.0.0.1]:45557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msTv3-0003iH-0e for submit@debbugs.gnu.org; Wed, 01 Dec 2021 13:01:25 -0500 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:40723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msTv0-0003bQ-Iz for 51281@debbugs.gnu.org; Wed, 01 Dec 2021 13:01:23 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 9BC6A4000D; Wed, 1 Dec 2021 18:01:15 +0000 (UTC) In-Reply-To: <87pmrfo67f.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 05 Nov 2021 00:24:04 +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:221217 Archived-At: --=-=-= Content-Type: text/plain >> Actually, this too confusing feature that allows changing prefix args >> during the repeating sequence increases code complexity enormously. >> For posterity I'll leave here the patch that completely supports it. >> But this feature will be removed (unless someone will ask to leave it): >> >> C-x } } C-1 C-2 } } C-3 C-4 } } >> >> Only this will remain: >> >> C-x } } C-1 C-2 C-x } } C-3 C-4 C-x } } > > Well, it may be slightly on the confusing side, but it does feel > natural, I think? So I think fixing it is better than removing it. I hesitate to make such massive change in repeat.el on the release branch. I have more patches for repeat.el that I'm unsure about to push. One of them is a patch that allows kbd syntax for 'repeat-exit-key': --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=repeat-exit-key-kbd.patch diff --git a/lisp/repeat.el b/lisp/repeat.el index 7bbb398873..8199bd3287 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -338,6 +338,7 @@ repeat-exit-key "Key that stops the modal repeating of keys in sequence. For example, you can set it to like `isearch-exit'." :type '(choice (const :tag "No special key to exit repeating sequence" nil) + (string :tag "Kbd string that exits repeating sequence") (key-sequence :tag "Key that exits repeating sequence")) :group 'convenience :version "28.1") @@ -437,7 +455,10 @@ repeat-post-hook ;; Adding an exit key (when repeat-exit-key - (define-key map repeat-exit-key 'ignore)) + (define-key map (if (stringp repeat-exit-key) + (kbd repeat-exit-key) + repeat-exit-key) + 'ignore)) (when (and repeat-keep-prefix (not prefix-arg)) (setq prefix-arg current-prefix-arg)) @@ -476,7 +497,9 @@ repeat-echo-message-string keys ", ") (if repeat-exit-key (format ", or exit with %s" - (key-description repeat-exit-key)) + (if (stringp repeat-exit-key) + repeat-exit-key + (key-description repeat-exit-key))) "")))) (defun repeat-echo-message (keymap) --=-=-=--