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: Mon, 16 Dec 2024 19:30:03 +0200 Organization: LINKOV.NET Message-ID: <87plls0zlk.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36207"; 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, eliz@gnu.org To: Paul Nelson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 18:46:30 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 1tNFAr-0009J6-Tz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 18:46:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNFAj-0001vS-81; Mon, 16 Dec 2024 12:46:22 -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 1tNFAR-0001oL-TX for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46:06 -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 1tNFAR-0004zQ-9u for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46: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=QsO2E5D8hlsx5q/YXGq1QDPPdt1MGsW5IMl7eLK0h9Q=; b=MEI+DyHcOMAlkpAgMSyIESlwZQshSf/j2RWPIBAACrFlUfOSR1DlJ4nnLe2vZafWK9AMb7qwi07d/vWUUkRMVv4zxpXm2/6PMKfanxscs5S8G/iPE/+oOldI53P/kw32nilq8V3rQYIVTzsqaqgWaSAKSyJOJZhiO+33zyI5buL71xGlSx6BIEuya4bBNKpz1x5jfWTIkASqGnSv1mwnID1VdEl4M1Vb6Oe8lAMf/2QD12Nwyy1SCJUUm2e6thkO38aYDcozSMcp4cWPc7+3HpcuaGr84aGSLUjVdpw8GqVo3t/SEAbxbG0hlqoXpAkfWl1ybS2abaRPS4fhKGjlhg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNFAQ-0007QX-SW for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46: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: Mon, 16 Dec 2024 17:46: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.173437112028454 (code B ref 74140); Mon, 16 Dec 2024 17:46:02 +0000 Original-Received: (at 74140) by debbugs.gnu.org; 16 Dec 2024 17:45:20 +0000 Original-Received: from localhost ([127.0.0.1]:55956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNF9j-0007Or-OQ for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:45:20 -0500 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:39239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNF9g-0007Lw-UD for 74140@debbugs.gnu.org; Mon, 16 Dec 2024 12:45:17 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 8131740002; Mon, 16 Dec 2024 17:44:48 +0000 (UTC) In-Reply-To: (Paul Nelson's message of "Mon, 16 Dec 2024 06:57:13 +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:297203 Archived-At: > Thanks Juri, I took a look at your implementation. It has at least the > following issue: the same command cannot be used to continue several > repeat maps. Consider for instance the following example: > > (defvar-keymap repeat-list-map > :doc "Keymap for repeating sequences." > :repeat ( :continue-only (yank undo)) > "n" 'forward-list > "p" 'backward-list > "C-/" 'undo > "y" 'yank) > > (defvar-keymap repeat-paragraph-map > :doc "Keymap for repeating sequences." > :repeat ( :continue-only (yank undo)) > "]" 'forward-paragraph > "}" 'forward-paragraph > "[" 'backward-paragraph > "{" 'backward-paragraph > "C-/" 'undo > "y" 'yank) > > This is why I think the repeat-continue-only property should be a list > specifying which repeat maps the command should continue. When I tried to evaluate your repeat-maps, I see that the 'repeat-continue-only' property is already a list: (symbol-plist 'undo) => (repeat-map repeat-paragraph-map repeat-continue-only (repeat-paragraph-map repeat-list-map)) Maybe the problem is that currently the 'repeat-map' property is not a list?