From: Paul Nelson <ultrono@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 74140@debbugs.gnu.org
Subject: bug#74140: [PATCH] Add :continue-only directive for repeat maps in bind-keys, use-package
Date: Wed, 27 Nov 2024 16:19:01 +0100 [thread overview]
Message-ID: <uxsg7twmgon1qy.fsf@gmail.com> (raw)
In-Reply-To: <87a5dl5daz.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 27 Nov 2024 09:46:44 +0200)
> Thanks for pointing out the case when the command is bound to the same key
> globally and in the repeat map. So checking for a key can't help here.
>
> Therefore, I implemented another solution in repeat.el. There is now
> a new symbol property 'repeat-continue-only'. And a command with this
> symbol property will not activate the repeat map, but will only continue
> the already activated repeating sequence. This is implemented by
> a simple change:
>
> (when (and (repeat-check-map map)
> (or (null (repeat--command-property 'repeat-continue-only))
> was-in-progress))
>
Thanks, I took a look. One disadvantage of this approach is that it
does not allow the same command to enter one repeat map and continue
another. I'll confess that I'm not aware of any such examples in my
config, but it still seems like an undesirable "non-local" effect.
This issue motivated my suggestion that the symbol property should be a
list of repeat maps that the command continues, although I haven't
considered the details (e.g., concerning the map vs. the symbol that
points to it) - maybe you have a clearer picture of those.
> BTW, while writing the 'bind-keys' test, I noticed there is no way
> to specify a command that only activates, but not continues
> (the same as :entry in 'defvar-keymap'). Is it true that 'bind-keys'
> has no such keyword, so there is a need to do this explicitly with:
>
> (put 'repeat-tests-bind-call-a 'repeat-map 'repeat-tests-bind-keys-repeat-map)
Yes, that's also my understanding (but it's not clear to me that it
requires such a keyword if its purpose is to bind keys in a map).
next prev parent reply other threads:[~2024-11-27 15:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 17:36 bug#74140: [PATCH] Add :continue-only directive for repeat maps in bind-keys, use-package Paul Nelson
2024-11-01 7:54 ` Juri Linkov
2024-11-01 8:29 ` Paul Nelson
2024-11-01 8:58 ` Paul Nelson
2024-11-04 19:22 ` Juri Linkov
2024-11-04 20:45 ` Paul Nelson
2024-11-05 18:25 ` Juri Linkov
2024-11-05 20:51 ` Paul Nelson
2024-11-07 19:41 ` Juri Linkov
2024-11-23 18:44 ` Paul Nelson
2024-11-27 7:46 ` Juri Linkov
2024-11-27 15:19 ` Paul Nelson [this message]
2024-11-28 19:12 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uxsg7twmgon1qy.fsf@gmail.com \
--to=ultrono@gmail.com \
--cc=74140@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).