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#74140: [PATCH] Add :continue-only directive for repeat maps in bind-keys, use-package Date: Thu, 07 Nov 2024 21:41:07 +0200 Organization: LINKOV.NET Message-ID: <875xoyu90s.fsf@mail.linkov.net> References: <86plnf9xqm.fsf@mail.linkov.net> <87ldxy953e.fsf@mail.linkov.net> <87v7x1edwr.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27366"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 74140@debbugs.gnu.org To: Paul Nelson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 07 20:45:39 2024 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 1t98Rm-0006v7-J0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Nov 2024 20:45:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t98RR-00085u-B1; Thu, 07 Nov 2024 14:45:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t98RD-00082w-HE for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 14:45:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t98RC-0001tp-Pt for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 14:45:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ZoQoZl131tpZJEpXKRjzamWwzTJPe1ndt+SOsqhTUm8=; b=R970wmts+PDcAkD6kwG81ovpKbKrY14zFG0GaLUJ0owQf9Ki2/4KnRDy/26YMI856nsGjx/HpPxo5v78NA1AFRnmTdfI8CmtvnsdfZvjlJN8casWzbAtyJOVzS3sTJ5T83Ys6WoEz/AysFIgeP8Ms/u9ysT5j3yaklbopchsnmj2atMmtcesin2MbubEnRZo5JwETQlztKnmpXhnEMI4sNWF6OKWtZe4But2KXgVuBvEExEJrBv21haCoCConW6AzyokvJviyKdMp5ISPLp0jwVu4NF6gqwQMGLwIeALQ0TGEsOb2fT/02UVqQhi9N89O791FhRCtw5VvfBWw3mmQA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t98RC-0000Dy-D3 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 14:45: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: Thu, 07 Nov 2024 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74140-submit@debbugs.gnu.org id=B74140.1731008678802 (code B ref 74140); Thu, 07 Nov 2024 19:45:02 +0000 Original-Received: (at 74140) by debbugs.gnu.org; 7 Nov 2024 19:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:49650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t98Qn-0000Cs-Kd for submit@debbugs.gnu.org; Thu, 07 Nov 2024 14:44:37 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t98Ql-0000CZ-HA for 74140@debbugs.gnu.org; Thu, 07 Nov 2024 14:44:36 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id B2447E0005; Thu, 7 Nov 2024 19:44:26 +0000 (UTC) In-Reply-To: (Paul Nelson's message of "Tue, 5 Nov 2024 21:51:11 +0100") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295045 Archived-At: >> Keys are required as well to be able to decide whether >> to activate the repeat-map. > > I still don't follow. Couldn't we somehow keep track of the active > repeat-map (or really, its underlying symbol) and check whether that > lies in the provided list? Why should it be necessary to keep track > of the key that activated it? In any event, we don't know in advance > whether the specific key is the same or different across the keymaps > that we do or do not want the command to participate in, so I don't > see how knowing the key could be a useful differentiating factor. Keys will help to avoid aliases. In your example: :continue-only ;; These commands will be available during paragraph manipulation ;; but won't activate paragraph-repeat-map themselves ("y" . yank) ("C-/" . undo)) to be able to not activate repeat-map on executing the command 'yank' with the global keybinding such as 'C-y', we can check that last-command-event is 'y'. Or do you think it would help to take into account the fact that the current repeat-map is already activated? But still in this case I don't see how it's possible to avoid checking the key. >> There are two possible ways to do this: opt-in and out-out. >> >> 1. opt-in defines all global keys that activate a repeat-map. e.g.: >> >> (put 'undo 'repeat-entry-keys '((paragraph-repeat-map . "C-x u"))) >> >> 2. out-out defines only keys from the repeat-map that should not activate it >> by a global key such as the global "u" ('self-insert-command') >> should not activate paragraph-repeat-map: >> >> (put 'undo 'repeat-no-entry-keys '((paragraph-repeat-map . "u"))) > > What do you have in mind if the user updates the binds in the keymaps? After any updates the user needs to update symbol properties as well.