all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: "49265@debbugs.gnu.org" <49265@debbugs.gnu.org>,
	Ergus <spacibba@aol.com>, Juri Linkov <juri@linkov.net>
Subject: bug#49265: [External] : bug#49265: 28.0.50; repeat mode feature request
Date: Wed, 30 Jun 2021 15:10:24 +0000	[thread overview]
Message-ID: <SA2PR10MB447459A7466F94BF9C5F8B87F3019@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <878s2rel58.fsf@gmail.com>

>     >> > I thought the question was whether Emacs automatically,
>     >> > or already in some way, provides some a way of
>     >> > determining (e.g. using Lisp code) whether a given
>     >> > command is repeatable (i.e., by just holding down a key
>     >> > that it's bound to).
>     >> >
>     >> > If that's the question then I think the answer is no.
>     >> > (Is that right?)
>     >>
>     >> The request was to create a new command that lists all
>     >> repeatable commands and keymaps.
> 
>     Drew> Which amounts to the same thing: determining whether
>     Drew> a given command is repeatable.  I don't think Emacs has
>     Drew> a way of determining that.  (It would even seem to be
>     Drew> undecidable...)
> 
> (mapatoms (lambda (sym)
>             (and (commandp sym)
>                  (get sym 'repeat-map)
>                  (message "repeatable %s" sym))))
> 
> gets you the potentially repeatable commands. Whether theyʼre
> actually repeatable depends on whether 'repeat-mode' is active.

I see.  But `repeat-map' and the code supporting the code
you show are not in any Emacs release.  They're not even
in Emacs 28 code from earlier this year.  They're in the
repeat.el I just downloaded from Master - OK.

But it's possible to define repeatable commands that
don't use repeat.el at all.

I think my general statement stands, that it's impossible
for this check to be fully accurate/complete.  At the
very least, its doc should make clear that it makes sense
only (1) starting with Emacs 28 and (2) only for repeatable
commands defined using repeat.el code.

(Of course, for Emacs 28 we need not say it's only for
Emacs 28 or later.  But some communication of that fact
would help users.)

>   Drew> (Though I don't know what you might mean by "and keymaps".
>   Drew> Repeatable keymaps?)
> 
> Bindings to repeatable commands maybe?

Maybe; who knows?  A binding to a command is not a
keymap, and vice versa.  (A key can be bound to a
keymap, however.)

  reply	other threads:[~2021-06-30 15:10 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87czs53aei.fsf.ref@aol.com>
2021-06-28 22:13 ` bug#49265: 28.0.50; repeat mode feature request Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-29  8:38   ` Juri Linkov
2021-06-29 15:25     ` bug#49265: [External] : " Drew Adams
2021-06-29 20:37       ` Juri Linkov
2021-06-29 21:28         ` Drew Adams
2021-06-30  9:50           ` Robert Pluim
2021-06-30 15:10             ` Drew Adams [this message]
2021-06-29 20:36     ` Juri Linkov
2021-06-29 21:33       ` bug#49265: [External] : " Drew Adams
2021-06-30  9:59         ` Robert Pluim
2021-06-30 15:11           ` Drew Adams
2021-06-30 19:56             ` Juri Linkov
2021-06-30 21:15               ` Drew Adams
2021-07-04 20:31                 ` Juri Linkov
2021-07-04 21:09                   ` Drew Adams
2021-07-05  9:48                     ` Robert Pluim
2021-07-05 14:53                       ` Drew Adams
2021-07-05 21:04                       ` Juri Linkov
2021-07-06  1:31                         ` Drew Adams
2021-07-06 17:54                           ` Juri Linkov
2021-07-06 18:25                             ` Drew Adams
2021-06-30 19:55           ` Juri Linkov
     [not found]             ` <87r1cdz72i.fsf@gmail.com>
     [not found]               ` <875ytn8ufp.fsf@mail.linkov.net>
2021-10-24 14:20                 ` Robert Pluim
2021-10-24 19:12                   ` Juri Linkov
2021-10-24 20:02                     ` Robert Pluim
2021-10-25  7:41                       ` Juri Linkov
2021-10-25  8:55                         ` Robert Pluim
2021-10-25  9:21                           ` Stefan Kangas
2021-10-25  9:59                             ` Robert Pluim
2021-10-25 10:14                             ` Andreas Schwab
2021-10-25 17:54                               ` Juri Linkov
2021-10-25 18:08                                 ` Stefan Monnier
2021-10-25 19:59                                   ` Robert Pluim
2021-10-25 20:57                                     ` Stefan Monnier
2021-10-26 10:06                                       ` Robert Pluim
2021-10-26 10:25                                         ` Robert Pluim
2021-10-26 12:39                                         ` Stefan Monnier
2021-10-26 12:46                                           ` Robert Pluim
2021-10-25 17:58                           ` Juri Linkov
2021-11-15 17:51             ` Juri Linkov
2021-11-15 18:21               ` Juri Linkov
2021-11-17 17:01                 ` Juri Linkov
2021-11-18 10:16                   ` Robert Pluim
2021-11-18 17:44                     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SA2PR10MB447459A7466F94BF9C5F8B87F3019@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=49265@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=rpluim@gmail.com \
    --cc=spacibba@aol.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.