From: Drew Adams <drew.adams@oracle.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
Subject: RE: Leaving out non-applicable commands on Mx
Date: Fri, 8 Jan 2016 19:08:59 -0800 (PST) [thread overview]
Message-ID: <4002fc97-5629-4367-8b8f-48b659fefdce@default> (raw)
In-Reply-To: <87bn8vh8q4.fsf@wanadoo.es>
> On the M-x prompt, the set of candidates is restricted to those that
> make sense given the current context.
Not if a user invokes `M-x' to see which commands are currently
available in general, i.e., as a kind of interactive `apropos'.
(Especially if s?he can hit a key to get help about the command.)
Especially if you have an "advanced completion system" that
lets you (a) match command names more flexibly and (b) narrow
the matches using a succession of patterns.
> Leaving out functions that are
> specific to modes not enabled is a start.
And that's also a feature of some "advanced completion
systems". But it should not (except by user option) be
the default behavior. The default behavior should be all
candidates matching the input patterns and the completion
predicate - no other "helpful" filtering unless requested
by the user.
The command calling `completing-read' or `read-file-name'
(or whatever) should get first shot at specifying the
filtering. And it does that, as usual, with a predicate.
> So if you are editing a C file and press `M-x g' almost
> all gnus* functions shall not be considered as
> candidates for completion.
Yes they should, by default - unless a user has configured
a different behavior.
Emacs is smartest when it doesn't try to outsmart the user;
when it helps the user be smart instead of trying to
second-guess her.
It's about what the user wants, not what an Emacs developer
thinks is clever or is what the user must want.
But hey, I sympathize wrt the many matches of something
like `gnus'. I filter those out by matching & tossing
them - unless I really want to see them for some reason.
Let the specific _command_, first, and the _user_ who
invokes it, second, filter out stuff that is not appropriate.
Please don't decide ahead of time (unless it's through a
specific command) what is appropriate and what is not.
> This is important with advanced completion systems.
See above about "advanced completion systems".
> An example: while working on a org-mode file, if I wish
> to execute org-clock-report I can use its binding:
> "C-c C-x C-r". With ido+flx, I can do "M-x ocr ENTER"
> which, IMO, is superior on each and every aspect.
And? Are you now suggesting that users and libraries
should not bind keys because you are convinced that your
"advanced completion system" is "superior on each and
every aspect"? I hope not.
> The M-x interface can be an improvement over both keybindings and the
> menu on terms of usability, given the correct methods, but having
> thousands of irrelevant candidates every time you invoke M-x is an
> inconvenience for that goal, not to say plain dumb.
Thousands of candidates might be just what a user wants.
But more importantly is to let the _user_ choose which
100 or which 10 of the thousands s?he really wants to
interact with.
Please don't presume to guess, in some general way, how a
user might want to filter candidates.
Specific commands already can, and do, make such judgments
(e.g. only symbols bound to commands are candidates for `M-x).
Leave it up to the command (and to the user who chooses
to use that command) to make such a preliminary judgment.
And more importantly, leave it up to the user to decide
how to subsequently filter the preliminary candidates.
What Emacs could do to help is to:
1. Provide powerful and flexible ways to match, and to
combine multiple match patterns.
2. Provide command-specific keys to use during completion,
to let the user filter in ways that are helpful in the
context of that command.
As one example (and I'm sure there are plenty of others),
Icicles lets you narrow using any number of patterns,
each of which can be a regexp or a fuzzy-match of various
kinds. You can exclude matches as well as including them.
And for buffer-name candidates, for example, you can use
keys to keep or remove the names of buffers in a derived
mode or a given mode or that are already displayed or not.
(You can even provide a filtering predicate interactively,
on the fly, to narrow candidates any fancy way you like.)
What Icicles offers is not the only way to help users
filter. The point is to try to do that, not try to
guess, in some general way, what kind of filtering is
good for them for all commands.
The way to do what you suggest wrt commands that make
sense for a given mode ("leaving out functions that are
specific to modes not enabled is a start") is to let the
user hit a key to do this, i.e., to ask for it on demand,
not to impose it on everyone and everywhere by default.
next prev parent reply other threads:[~2016-01-09 3:08 UTC|newest]
Thread overview: 141+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-25 6:21 4K Bugs Lars Ingebrigtsen
2015-12-25 7:46 ` Eli Zaretskii
2015-12-25 17:00 ` John Wiegley
2015-12-25 17:30 ` Lars Ingebrigtsen
2015-12-25 17:51 ` John Wiegley
2015-12-25 17:53 ` Lars Ingebrigtsen
2015-12-25 17:59 ` John Wiegley
2015-12-25 18:27 ` jpff
2015-12-25 18:35 ` Lars Ingebrigtsen
2015-12-25 18:33 ` Dmitry Gutov
2015-12-25 18:40 ` Lars Ingebrigtsen
2015-12-25 18:54 ` Lars Ingebrigtsen
2015-12-25 19:46 ` Dmitry Gutov
2015-12-25 20:06 ` Lars Ingebrigtsen
2015-12-25 19:36 ` John Wiegley
2015-12-25 19:56 ` Dmitry Gutov
2015-12-25 20:05 ` Eli Zaretskii
2015-12-25 20:26 ` Lars Ingebrigtsen
2015-12-26 13:16 ` Michael Albinus
2015-12-26 8:07 ` Andreas Röhler
2015-12-26 10:29 ` Eli Zaretskii
2015-12-26 15:14 ` Andreas Röhler
2015-12-26 16:34 ` Eli Zaretskii
2015-12-26 16:41 ` Lars Ingebrigtsen
2015-12-26 16:52 ` Eli Zaretskii
2015-12-26 16:59 ` Lars Ingebrigtsen
2015-12-26 17:55 ` Ivan Shmakov
2015-12-26 17:58 ` Lars Ingebrigtsen
2015-12-26 18:12 ` Ivan Shmakov
2015-12-26 18:21 ` Lars Ingebrigtsen
2015-12-26 18:42 ` Ivan Shmakov
2015-12-26 18:48 ` Lars Ingebrigtsen
2015-12-27 22:41 ` Per Starbäck
2015-12-28 9:44 ` Andreas Röhler
2015-12-28 20:18 ` John Wiegley
2015-12-26 16:59 ` Paul Eggert
2015-12-26 17:48 ` Lars Ingebrigtsen
2015-12-28 20:15 ` John Wiegley
2015-12-26 14:55 ` Lars Ingebrigtsen
2015-12-27 2:52 ` Richard Stallman
2015-12-27 6:07 ` Lars Ingebrigtsen
2016-01-07 20:10 ` Phillip Lord
2016-01-07 22:38 ` Phillip Lord
2016-01-09 4:26 ` Andrew Hyatt
2016-01-09 9:20 ` Michael Albinus
2016-01-07 23:32 ` John Wiegley
2016-01-08 0:17 ` Xue Fuqiao
2016-01-08 12:49 ` Phillip Lord
2016-01-08 1:41 ` Alexis
2016-01-08 1:50 ` Richard Copley
2016-01-08 2:41 ` Alexis
2016-01-09 1:51 ` John Wiegley
2016-01-08 12:48 ` Phillip Lord
2016-01-08 13:06 ` Michael Albinus
2016-01-08 13:59 ` Phillip Lord
2016-01-08 14:12 ` Michael Albinus
2016-01-09 2:52 ` Alexis
2016-01-10 15:58 ` Michael Albinus
2016-01-11 8:05 ` Alexis
2016-01-08 8:28 ` Lars Magne Ingebrigtsen
2016-01-08 12:57 ` Phillip Lord
2016-01-08 13:37 ` Michael Albinus
2016-01-08 13:52 ` Lars Magne Ingebrigtsen
2016-01-11 13:52 ` Phillip Lord
2016-01-11 16:18 ` Lars Magne Ingebrigtsen
2016-01-08 15:05 ` Stefan Monnier
2016-01-08 23:16 ` Leaving out non-applicable commands on Mx (was: 4K Bugs) Óscar Fuentes
2016-01-09 0:22 ` Leaving out non-applicable commands on Mx John Wiegley
2016-01-09 0:55 ` Óscar Fuentes
2016-01-09 1:46 ` John Wiegley
2016-01-09 1:54 ` Spencer Boucher
2016-01-09 3:09 ` Drew Adams
2016-01-09 3:37 ` Óscar Fuentes
2016-01-09 2:15 ` Óscar Fuentes
2016-01-09 3:09 ` Drew Adams
2016-01-09 3:49 ` Óscar Fuentes
2016-01-09 4:14 ` Stefan Monnier
2016-01-09 3:09 ` Drew Adams
2016-01-09 3:08 ` Drew Adams [this message]
2016-01-09 3:33 ` Óscar Fuentes
2016-01-09 9:05 ` Yuri Khan
2016-01-09 19:27 ` Drew Adams
2016-01-09 20:55 ` Making `interactive' conditional (was: Leaving out non-applicable commands on Mx) John Wiegley
2016-01-09 21:53 ` Drew Adams
2016-01-11 12:02 ` Drew Adams
2016-01-10 9:02 ` Making `interactive' conditional Lars Magne Ingebrigtsen
2016-01-10 10:09 ` Clément Pit--Claudel
2016-01-10 17:55 ` Drew Adams
[not found] ` <CAAdUY-Kfm-0JbOLpi4KE5wkmp6hfG+-y3V-_vTExaFkmF5RmEg@mail.gmail.com>
2016-01-10 12:36 ` Artur Malabarba
2016-01-11 3:46 ` Richard Stallman
2016-01-11 15:13 ` Lars Magne Ingebrigtsen
2016-01-11 6:13 ` Stefan Monnier
2016-01-11 6:48 ` Óscar Fuentes
2016-01-11 14:08 ` Herring, Davis
2016-01-11 16:34 ` Óscar Fuentes
2016-01-12 4:46 ` Herring, Davis
2016-01-12 4:59 ` Óscar Fuentes
2016-01-11 15:15 ` Lars Magne Ingebrigtsen
2016-01-12 2:14 ` Clément Pit--Claudel
2016-01-10 15:27 ` Making `interactive' conditional (was: Leaving out non-applicable commands on Mx) Alan Mackenzie
2016-01-10 16:47 ` Making `interactive' conditional Óscar Fuentes
2016-01-10 18:23 ` Drew Adams
2016-01-10 19:31 ` Óscar Fuentes
2016-01-10 22:40 ` Drew Adams
2016-01-10 23:19 ` Óscar Fuentes
2016-01-10 18:22 ` Making `interactive' conditional (was: Leaving out non-applicable commands on Mx) Drew Adams
2016-01-11 6:29 ` Making `interactive' conditional Stefan Monnier
2016-01-11 11:48 ` Drew Adams
2016-01-10 18:33 ` Clément Pit--Claudel
2016-01-10 22:28 ` Making `interactive' conditional (was: Leaving out non-applicable commands on Mx) Marcin Borkowski
2016-01-11 6:19 ` Making `interactive' conditional Stefan Monnier
2016-01-19 6:24 ` John Wiegley
2016-01-19 10:11 ` Lars Magne Ingebrigtsen
2016-01-19 11:17 ` Lars Magne Ingebrigtsen
2016-01-19 13:31 ` Stefan Monnier
2016-01-19 16:52 ` Drew Adams
2016-01-19 15:28 ` Óscar Fuentes
2016-01-19 16:07 ` Lars Magne Ingebrigtsen
2016-01-19 20:24 ` Óscar Fuentes
2016-01-19 16:20 ` John Wiegley
2016-01-19 17:55 ` Lars Magne Ingebrigtsen
2016-01-19 18:39 ` John Wiegley
2016-01-19 19:02 ` Lars Magne Ingebrigtsen
2016-01-19 20:23 ` Óscar Fuentes
2016-01-09 8:06 ` Leaving out non-applicable commands on Mx Lars Magne Ingebrigtsen
2016-01-09 14:50 ` Óscar Fuentes
2016-01-09 17:32 ` Stefan Monnier
2016-01-10 8:53 ` Lars Magne Ingebrigtsen
2016-01-10 16:05 ` Stefan Monnier
2016-02-04 3:19 ` Lars Ingebrigtsen
2016-01-10 16:07 ` Stefan Monnier
2016-01-10 16:14 ` Óscar Fuentes
2016-01-08 10:50 ` 4K Bugs Michael Albinus
2016-01-08 13:21 ` Phillip Lord
2016-01-08 13:33 ` Michael Albinus
2016-01-08 14:08 ` Phillip Lord
2016-01-09 4:21 ` Andrew Hyatt
2016-01-09 8:42 ` Michael Albinus
2016-01-11 13:54 ` Phillip Lord
2016-01-08 19:27 ` Stephen Leake
2016-01-08 20:52 ` Michael Albinus
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=4002fc97-5629-4367-8b8f-48b659fefdce@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
/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).