From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Nelson 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 21:01:57 +0100 Message-ID: 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="19934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74140@debbugs.gnu.org, eliz@gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 21:04:10 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 1tNHK6-00050i-HR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 21:04:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNHK0-0006dx-S8; Mon, 16 Dec 2024 15:04:04 -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 1tNHJz-0006dp-Ev for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 15:04: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 1tNHJy-0000hj-9V for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 15:04: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:In-Reply-To:From:To:References:Subject; bh=wWQCEETXCOzmBqEdewyvBf8wULty6tUu1Tbn/AqhbnU=; b=PkV7/TJOSGNhTwtbnoWrf5QNVC69nF2nAaRWi5Xf+2kJ1yiiJfZzqf9Ovi5qTVFeICpZOmd0BGmQqUJnTwIFk8e1QeGb9wJmTZV1+d/hkHuknuJ+g9cPzeZ5JUp0pyN2laWNjypyn7At5SO+epV5lTcFpGos+IVCm5DwSqPjzA3H2aTjp/8vCWJzTcPVmPX+ZhERL60uNkJ8+hV+UWJ4o8UwQlcOqVvMeIHHlCCgCcOmwZFuLOSyF148LOuQPF/1gOvJFsaRbWk0iqm4I7vjHyRVjSXRI6erenjZQEZ/iYb4gkZoKXFM0gsal/1duRu+dFg4gAnx+xN6ZcEczipkqQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNHJy-0006ak-4W for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 15:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Nelson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2024 20:04: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.173437938525211 (code B ref 74140); Mon, 16 Dec 2024 20:04:02 +0000 Original-Received: (at 74140) by debbugs.gnu.org; 16 Dec 2024 20:03:05 +0000 Original-Received: from localhost ([127.0.0.1]:56339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNHJ2-0006YY-TJ for submit@debbugs.gnu.org; Mon, 16 Dec 2024 15:03:05 -0500 Original-Received: from mail-lf1-f48.google.com ([209.85.167.48]:57605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNHJ0-0006Xy-Ox for 74140@debbugs.gnu.org; Mon, 16 Dec 2024 15:03:03 -0500 Original-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5401c52000dso4967842e87.3 for <74140@debbugs.gnu.org>; Mon, 16 Dec 2024 12:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734379321; x=1734984121; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=wWQCEETXCOzmBqEdewyvBf8wULty6tUu1Tbn/AqhbnU=; b=QeBz9A3/sN9VD/mTdIQ+x+Daz2r2VFtYnTbNcPnUYGojG1TTcd24ODGI0FUAO3hIM2 4RejpuAWfR4X5M7uZTHoJzJqSTByEOjpwMSEN/uxf7o7aGh6H1yVri+71eSkf059bNpm rAU909TuzfbltMoug58XfZBvN7CjqGJajFEHKY2Q8Wi7f2gsHiaCJwuzJZ98x7N7itpx ITRyV2veApY6xNCtWA8hJWXHnFfekRc3cn1MOKzpFBCkqGM86WVbM2hT4PtkjvKEndj+ Ko8UvxHJVUuDBf6JMP3UhUULI+QsVmFR3elJAS4ZoJZlXzJJghruLPFUytSUYVVAu749 sp7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734379321; x=1734984121; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wWQCEETXCOzmBqEdewyvBf8wULty6tUu1Tbn/AqhbnU=; b=v/ngKC+iqF2qlkN3+ZDGtTiSh0OTwbTHvC3X7yWZNwAicOvm+wLFC3NwAhxAo9JPsd B30YeiymtOHMEyItBT3CtDQcTUvAYI4+9/D4Sc2vHMpaDrzX8imL1cm9xUcrIvzgDnnZ DtirV+EpYgcoNTQYDOThzgmtmfoFy2LU+gkmFoFLEwcnQ9YCkJY2XgqWata3gIBN93mv kaNVRmC8V+CpeaohG+fW9oYzEWwvq6EP5EbmF5vTtNFJXQBcTJnp6rjNjNLq8PbNeC+X Is1RPm/diGF2Tm0ppkNHF90pb7pRLcCW2/JZn0CZNjd6POoSVHhOlAI/XP1qQSW3UpGB PNhg== X-Forwarded-Encrypted: i=1; AJvYcCXY0dnGUeM3z4/d+lXTXrjM5T2SnOwGPjs2PYrBDOkS9MkM5VHYlq+eH5XV57BjwCHFf1KXkw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzrW0AEXuZNl4vL+ONvB5/+MBmmgw8eOUfqqLzEvcQ9hASphkSl 2YzCSrsIV4jpUNfFxasKlqbCgUAT5/SKOHzd5btUZuMd5/QfVIPe X-Gm-Gg: ASbGnctv5OYN+gj+05BVVRNXbfmLqwFRKs00KiPmBIuMF/9X/z5EiyJVkB4qAWwY2yW JYEDwSp5+CMxhKWMrZJjrDOnHEPhlXR9LF1Z3n1vfT7bEBMsbo8o/zS6V+E/NMpgfiCZS4trV6Q V/cLY4bkLIsFj7KglerjHhFxbusaEMpAG+BrO4lJOAhA0S3r2sjMf/rjQf/cMcAWa5becqqh/HU 3d+F0CNqnY8RFGhv61C7t/qHGcWyuXf8pP/g8/+hDlnakkdXdAw4fVi8I9n1GY7Z1l2qqVG/TMx oWXg+F2q0OSuuqrar6at0Q0= X-Google-Smtp-Source: AGHT+IHeXDbS6DFY4EYl9jXFdsc4aRNsQuCJCasDpm/XAUiLlhASDor5KxqvlZlABjmV5KDquRqADg== X-Received: by 2002:ac2:4c47:0:b0:53e:2bb0:4942 with SMTP id 2adb3069b0e04-54099b6d640mr4593101e87.57.1734379320870; Mon, 16 Dec 2024 12:02:00 -0800 (PST) Original-Received: from localhost (0x573d66b5.static.cust.fastspeed.dk. [87.61.102.181]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54120bffd10sm946149e87.161.2024.12.16.12.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 12:01:59 -0800 (PST) In-Reply-To: <87plls0zlk.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 16 Dec 2024 19:30:03 +0200) 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:297226 Archived-At: Juri Linkov writes: > > 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? I think the repeat-map property is fine as is, but the logic should be a bit different: - If a command is called while repeat map MAP is active, then: - If the command's repeat-continue-only property contains MAP, then MAP remains active (i.e., that map "continues"). [Maybe a better name for the property would be simply "repeat-continue".] - Otherwise, if the command has a repeat-map property, then that becomes the new repeat map. - Otherwise, the repeat map deactivates. - If a command is called while no repeat map is active, then we proceed as before. Do you agree that this is the desired behavior? The difference is that with the current implementation, only the repeat-map property is relevant for determining which repeat map a command activates or continues.