unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>, Ergus <spacibba@aol.com>
Cc: "49265@debbugs.gnu.org" <49265@debbugs.gnu.org>
Subject: bug#49265: [External] : bug#49265: 28.0.50; repeat mode feature request
Date: Tue, 29 Jun 2021 15:25:42 +0000	[thread overview]
Message-ID: <SA2PR10MB4474F8AAEA2B3588A262368EF3029@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87h7hh6o8t.fsf@mail.linkov.net>

> > Is it possible to add a command to get information about the commands
> > that have a repeat map? Basically something to know the commands with
> > some associated repeat like list-repeat-commands or describe-repeat or
> > so?
> 
> I thought that such a command could have the same prefix like 'repeat-help',
> but prefixes 'list-' and 'describe-' are also fine.  Maybe it should be
> similar to 'describe-bindings' or better 'describe-keymap'.

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?)
___

If the question is instead just whether there is some
naming convention for such repeatable commands, or if
it is just a suggestion to have such a convention, then
I'll offer the naming pattern I use for such commands:

I append `+' to the command name.

For example, I use `end-of-line+' as the name of my
repeatable version of `end-of-line'.

  If called interactively with no prefix arg:
     If the previous command was also `end-of-line+',
     then move to the end of the next line.  Else, move
     to the end of the current line.
  Otherwise, move to the end of the Nth next line (Nth
     previous line if N<0).  Command `end-of-line', by
     contrast, moves to the end of the (N-1)th next line.

Similarly, repeatable command `doremi-bg+' changes a
frame's background color incrementally.

IMO, it makes much more sense to use a suffix for a
"repeatable" indication than to use a prefix.  And
there's no need for a long (pre|suf)fix, such as
`repeat-'.

Emphasis should be on the actual command name, and not
on the fact that it's repeatable.  One char (or at most
`-' followed by a single char) should suffice.
___

The other part of the request is to have a command
that shows, describes, etc. only repeatable commands.
With my naming that trivially amounts to typing a
pattern that matches `+'.

Even if your completion method doesn't let you limit
matches to `+' only at the end of the name, you'll
likely get only repeatable commands, as there aren't
many existing commands with `+' in the name.

And of course it's easy to define a command that
matches only command names with `+' at the end.
And such a command could do anything you like with
the result (describe all matching commands, return
nil or non-nil for a given command-name arg,...).







  reply	other threads:[~2021-06-29 15:25 UTC|newest]

Thread overview: 27+ 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     ` Drew Adams [this message]
2021-06-29 20:37       ` bug#49265: [External] : " Juri Linkov
2021-06-29 21:28         ` Drew Adams
2021-06-30  9:50           ` Robert Pluim
2021-06-30 15:10             ` Drew Adams
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
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

  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=SA2PR10MB4474F8AAEA2B3588A262368EF3029@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=49265@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --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 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).