From: Drew Adams <drew.adams@oracle.com>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Current mode command discovery
Date: Sun, 21 Feb 2021 22:46:07 +0000 [thread overview]
Message-ID: <SA2PR10MB4474E7E970B907C56C66EA05F3829@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87blcdaynd.fsf@gmail.com>
> > Have we seen a complete, succinct, description
> > of the two "features" (which both apparently
> > filter)?
> >
> > Could someone please post that description,
> > apart from these long, convoluted threads?
> >
> I believe the NEWS file on the master branch has been kept up-to-date:
>
> https://urldefense.com/v3/__https://git.savannah.gnu.org/cgit/emacs.git
> /tree/etc/NEWS__;!!GqivPVa7Brio!MbL7drkVlsbDK4CmZc61-V9hngoLnSJgmc-
> UKRC65sOOHceASdzWB6ma_FTFY8ad$
Thanks.
> > ** New command 'execute-extended-command-for-buffer'.
> > This new command, bound to 'M-S-x', works like
> > 'execute-extended-command', but limits the set of commands to the
> > commands that have been determined to be particularly useful with the
> > current mode.
We still have no description (let alone a spec) of
what "particularly useful" for a mode should mean.
It's admitted that this is a judgment call, but no
criteria for judgment have been given, AFAIK, except
for Stefan's NOT-useful-if-always-raises-error. And
that was said by others not to be a real criterion.
So that new command seems particularly undefined...
However, the particularly useful objections raised
so far have been wrt the implementation: hard-coding
the association of command & mode(s) in source code.
> > ** New user option 'read-extended-command-predicate'.
> > This option controls how 'M-x' performs completion of commands when
> > you type TAB. By default, any command that matches what you have
> > typed is considered a completion candidate, but you can customize
> > this option to exclude commands that are not applicable to the current
> > buffer's major and minor modes, and respect the command's completion
> > predicate (if any).
I see. But which way does the predicate go?
Does it filter out or filter in? I guess that
description doesn't help with that basic question,
and you have to use `C-h v' to find out.
How does this predicate relate to or interact with
the tampering with `interactive' (new, second arg)
in the source code? Is the predicate an additional
test? An overriding test?
> > ** New forms to declare how completion should happen has been added.
(Grammar problem in that sentence: plural subject,
singular verb.)
> > '(declare (completion PREDICATE))' can be used as a general predicate
> > to say whether the command should be present when completing with
> > 'M-x TAB'. '(declare (modes MODE...))' can be used as a short-hand
> > way of saying that the command should be present when completing from
> > buffers in major modes derived from MODE..., or, if it's a minor
> > mode, whether that minor mode is enabled in the current buffer.
So the first one applies only when no input is typed
at the `M-x' prompt - just `TAB'? No effect otherwise?
Or is that also true of the second one (using `modes')?
How does the `M-x TAB' filtering interact with filtering
by the new option (above)? (Same question posed above.)
> > ** The 'interactive' syntax has been extended to allow listing
> > applicable modes.
> > Forms like '(interactive "p" dired-mode)' can be used to annotate the
> > commands as being applicable for modes derived from 'dired-mode',
> > or if the mode is a minor mode, that the current buffer has that
> > minor mode activated. Note that using this form will create byte
> > code that is not compatible with byte code in previous Emacs versions.
This sounds like a repeat of what is said in the previous
entry (except for the last sentence). Is that right? If
so, why have both?
___
And again, why go through all that, and make users go
through all of it, instead of just putting a property
on a command symbol to indicate the same thing(s?)?
next prev parent reply other threads:[~2021-02-21 22:46 UTC|newest]
Thread overview: 177+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 17:19 Current mode command discovery Lars Ingebrigtsen
2021-02-14 17:26 ` Sean Whitton
2021-02-15 3:00 ` Lars Ingebrigtsen
2021-02-14 17:29 ` Gregory Heytings
2021-02-15 3:02 ` Lars Ingebrigtsen
2021-02-16 12:21 ` Stefan Kangas
2021-02-16 12:38 ` Lars Ingebrigtsen
2021-02-16 12:56 ` Dmitry Gutov
2021-02-14 17:51 ` Eli Zaretskii
2021-02-14 17:56 ` Lars Ingebrigtsen
2021-02-14 18:15 ` Eli Zaretskii
2021-02-15 3:04 ` Lars Ingebrigtsen
2021-02-15 15:13 ` Eli Zaretskii
2021-02-16 12:04 ` Lars Ingebrigtsen
2021-02-16 15:36 ` Eli Zaretskii
2021-02-16 16:28 ` Lars Ingebrigtsen
2021-02-16 17:06 ` Eli Zaretskii
2021-02-16 18:08 ` Basil L. Contovounesios
2021-02-16 18:12 ` Lars Ingebrigtsen
2021-02-16 18:18 ` Eli Zaretskii
2021-02-16 18:37 ` Lars Ingebrigtsen
2021-02-16 18:51 ` Eli Zaretskii
2021-02-16 18:57 ` Lars Ingebrigtsen
2021-02-16 19:24 ` Eli Zaretskii
2021-02-16 19:33 ` Lars Ingebrigtsen
2021-02-16 19:50 ` Eli Zaretskii
2021-02-16 20:55 ` Lars Ingebrigtsen
2021-02-17 3:25 ` Eli Zaretskii
2021-02-17 11:11 ` Lars Ingebrigtsen
2021-02-17 17:01 ` Eli Zaretskii
2021-02-18 6:02 ` Richard Stallman
2021-02-16 23:32 ` Óscar Fuentes
2021-02-17 15:38 ` Eli Zaretskii
2021-02-17 16:28 ` tomas
2021-02-17 17:49 ` Lars Ingebrigtsen
2021-02-17 19:25 ` Eli Zaretskii
2021-02-17 19:33 ` Lars Ingebrigtsen
2021-02-17 18:00 ` Óscar Fuentes
2021-02-17 19:34 ` Eli Zaretskii
2021-02-19 5:41 ` Richard Stallman
2021-02-19 8:57 ` Eli Zaretskii
2021-02-19 12:52 ` Lars Ingebrigtsen
2021-02-19 22:33 ` chad
2021-02-19 23:01 ` Stefan Monnier
2021-02-19 23:19 ` [External] : " Drew Adams
2021-02-20 7:01 ` Eli Zaretskii
2021-02-20 19:43 ` Drew Adams
2021-02-21 17:10 ` Drew Adams
2021-02-20 13:15 ` Lars Ingebrigtsen
2021-02-20 14:36 ` Stefan Monnier
2021-02-22 4:00 ` Lars Ingebrigtsen
2021-02-22 5:27 ` [External] : " Drew Adams
2021-02-20 19:43 ` Drew Adams
2021-02-19 14:52 ` Stefan Kangas
2021-02-17 18:32 ` [External] : " Drew Adams
2021-02-20 11:16 ` Jean Louis
2021-02-17 8:34 ` Robert Pluim
2021-02-17 11:15 ` Lars Ingebrigtsen
2021-02-14 23:30 ` [External] : " Drew Adams
2021-02-14 19:53 ` Óscar Fuentes
2021-02-14 20:25 ` Alan Mackenzie
2021-02-14 21:20 ` tomas
2021-02-14 23:02 ` Stefan Kangas
2021-02-14 23:30 ` [External] : " Drew Adams
2021-02-14 21:20 ` Philip Kaludercic
2021-02-14 21:39 ` Óscar Fuentes
2021-02-14 22:07 ` tomas
2021-02-14 23:30 ` [External] : " Drew Adams
2021-02-14 23:30 ` Drew Adams
2021-02-14 23:30 ` Drew Adams
2021-02-14 23:30 ` Drew Adams
2021-02-14 19:37 ` Dmitry Gutov
2021-02-14 20:00 ` Óscar Fuentes
2021-02-14 20:16 ` Dmitry Gutov
2021-02-14 20:49 ` Óscar Fuentes
2021-02-14 21:56 ` Dmitry Gutov
2021-02-14 23:18 ` Stefan Kangas
2021-02-14 23:46 ` Lars Ingebrigtsen
2021-02-15 2:26 ` Dmitry Gutov
2021-02-15 0:29 ` Matt Armstrong
2021-02-15 2:45 ` Lars Ingebrigtsen
2021-02-17 2:20 ` Óscar Fuentes
2021-02-17 11:29 ` Dmitry Gutov
2021-02-17 11:30 ` Lars Ingebrigtsen
2021-02-17 16:26 ` Dmitry Gutov
2021-02-17 17:52 ` Lars Ingebrigtsen
2021-02-17 22:46 ` Dmitry Gutov
2021-02-18 10:14 ` Lars Ingebrigtsen
2021-02-18 13:05 ` Dmitry Gutov
2021-02-18 14:06 ` Lars Ingebrigtsen
2021-02-18 17:15 ` Dmitry Gutov
2021-02-19 12:23 ` Lars Ingebrigtsen
2021-02-19 12:30 ` Eli Zaretskii
2021-02-19 12:34 ` Lars Ingebrigtsen
2021-02-19 12:42 ` Eli Zaretskii
2021-02-19 12:59 ` Lars Ingebrigtsen
2021-02-19 13:40 ` Eli Zaretskii
2021-02-19 13:45 ` Lars Ingebrigtsen
2021-02-19 13:54 ` Eli Zaretskii
2021-02-19 14:07 ` Lars Ingebrigtsen
2021-02-19 12:35 ` Dmitry Gutov
2021-02-19 12:43 ` Eli Zaretskii
2021-02-19 12:52 ` Dmitry Gutov
2021-02-19 12:38 ` Dmitry Gutov
2021-02-17 18:21 ` Matt Armstrong
2021-02-17 18:32 ` Lars Ingebrigtsen
2021-02-17 22:26 ` Matt Armstrong
2021-02-17 22:33 ` Lars Ingebrigtsen
2021-02-17 18:41 ` Stefan Kangas
2021-02-17 22:28 ` Matt Armstrong
2021-02-20 11:55 ` Jean Louis
2021-02-20 11:49 ` Jean Louis
2021-02-20 14:18 ` Lars Ingebrigtsen
2021-02-20 14:29 ` Eli Zaretskii
2021-02-20 14:31 ` Lars Ingebrigtsen
2021-02-20 14:38 ` Eli Zaretskii
2021-02-20 14:51 ` Alfred M. Szmidt
2021-02-20 16:52 ` Gregory Heytings
2021-02-20 17:20 ` Alfred M. Szmidt
2021-02-20 17:43 ` Gregory Heytings
2021-02-20 17:31 ` Andreas Schwab
2021-02-20 20:17 ` Alfred M. Szmidt
2021-02-20 21:10 ` Stefan Monnier
2021-02-20 22:09 ` Alfred M. Szmidt
2021-02-21 6:15 ` Richard Stallman
2021-02-21 15:13 ` Eli Zaretskii
2021-02-20 21:43 ` Gregory Heytings
2021-02-20 22:09 ` Alfred M. Szmidt
2021-02-20 22:22 ` Gregory Heytings
2021-02-20 23:53 ` Alfred M. Szmidt
2021-02-20 21:58 ` Andreas Schwab
2021-02-20 23:53 ` Alfred M. Szmidt
2021-02-28 12:32 ` Jean Louis
2021-02-28 12:41 ` Andreas Schwab
2021-02-28 17:21 ` Alfred M. Szmidt
2021-02-20 14:51 ` Lars Ingebrigtsen
2021-02-20 15:23 ` Eli Zaretskii
2021-02-20 16:17 ` Dmitry Gutov
2021-02-20 19:45 ` [External] : " Drew Adams
2021-02-21 16:55 ` Drew Adams
2021-02-21 21:39 ` Kévin Le Gouguec
2021-02-21 22:46 ` Drew Adams [this message]
2021-02-21 12:42 ` Lars Ingebrigtsen
2021-02-20 14:57 ` Lars Ingebrigtsen
2021-02-20 15:11 ` Eli Zaretskii
2021-02-21 15:44 ` Lars Ingebrigtsen
2021-02-21 17:00 ` Eli Zaretskii
2021-02-21 17:46 ` Lars Ingebrigtsen
2021-02-21 18:09 ` Eli Zaretskii
2021-02-22 14:34 ` Lars Ingebrigtsen
2021-02-22 15:53 ` Eli Zaretskii
2021-02-20 19:45 ` [External] : " Drew Adams
2021-02-20 14:56 ` Stefan Monnier
2021-02-20 14:59 ` Lars Ingebrigtsen
2021-02-20 15:37 ` Stefan Kangas
2021-02-20 16:05 ` Eli Zaretskii
2021-02-20 16:18 ` Stefan Monnier
2021-02-20 16:22 ` Dmitry Gutov
2021-02-20 16:23 ` Stefan Kangas
2021-02-20 16:44 ` Eli Zaretskii
2021-02-20 17:25 ` Stefan Kangas
2021-02-20 17:29 ` Eli Zaretskii
2021-02-21 6:18 ` Richard Stallman
2021-02-21 15:19 ` Eli Zaretskii
2021-02-21 16:54 ` [External] : " Drew Adams
2021-02-21 16:44 ` Drew Adams
2021-02-21 6:23 ` Richard Stallman
2021-02-21 12:55 ` Lars Ingebrigtsen
2021-02-21 15:33 ` Eli Zaretskii
2021-02-21 15:47 ` Lars Ingebrigtsen
2021-02-21 17:03 ` Eli Zaretskii
2021-02-21 17:44 ` Lars Ingebrigtsen
2021-02-21 18:01 ` Eli Zaretskii
2021-02-21 18:21 ` Lars Ingebrigtsen
2021-02-21 18:28 ` Eli Zaretskii
2021-02-21 18:37 ` Lars Ingebrigtsen
2021-02-21 19:20 ` Eli Zaretskii
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=SA2PR10MB4474E7E970B907C56C66EA05F3829@SA2PR10MB4474.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=kevin.legouguec@gmail.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).