all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
Subject: RE: Ordering of command completions
Date: Sun, 7 Dec 2014 12:10:06 -0800 (PST)	[thread overview]
Message-ID: <2559f693-8b4b-40c7-b3b4-4b5d932c377c@default> (raw)
In-Reply-To: <87r3wbtfn9.fsf@wanadoo.es>

> I use Ido+flx. Yes, as you type the number of candidates quickly
> decrease from thousands to dozens, but my experience is that the
> vast majority of candidates are not applicable on the current
> context and they force you to type quite a bit more.

I don't disagree wrt "applicable on the current context", but
I'm wary as to what someone might think that should mean.

I don't think Emacs should be overly ambitious here in excluding
commands.  It should instead exclude only commands that it is
absolutely sure no user would be able to use in the current
context.  What "context" means here is probably the real question.

> Then we have non-predictability. You enable a mode through an
> autoloaded function and suddenly, for the rest of the Emacs
> session, `M-x foo' no longer resolves to the same list of
> candidates where it used to.

You see?  Now that's an example of what I meant by the meaning
of "context" being important.

To me, if you have loaded a library that defines commands that
you can invoke currently (which, a priori is the case for most
commands), then I *want* `M-x' to include those commands when
my input matches their names.

If I load a library (or it is autoloaded) then I expect to be
able to invoke its commands using `M-x'.  I certainly hope
that feature is not removed in favor of some "predictability".

I am becoming more wary of the proposed change...

> > Certainly any command that is bound to a key sequence that
> > is available in the current context should be a candidate.
> > (That's a minimum.)
> 
> IMHO introducing ad-hoc heuristics for *discarding* candidates
> is very risky.

That was my point.  Emacs needs to be very sure that it makes
no sense for a given command to be invoked currently using
`M-x', before it thinks about excluding that command.

A priori, there are very few commands that can reasonably
be excluded, with that in mind.  And in that case, little
is gained, in terms of reducing the supposed "noise".

And something is lost: the user does not see those commands.
S?he may well become confused, and think that this or that
command has not been defined or is no longer supported or...

> OTOH, if it is a matter of sorting the candidates, which is
> what the OP suggested, it is fine.

I see.  I misunderstood.  I asked whether by "noise" what
was meant was a large number of candidates.  I guess the
answer is no.  It is apparently the position of inappropriate
candidates high in the sort order that constitutes "noise",
and not their mere presence.

In that case I have a different objection.  The sorting
being used should be *very clear to users*.  And in
general it should not combine very different criteria,
such as (1) appropriateness (one form of which is what
this proposed feature is about, I guess) and, say,
(2) how recently candidates were used (or some other
sorting criterion, such as alphabetic comparison).

If sorting combines such different criteria then it can
be confusing to users.  This is all the more nefarious if
a measure of "inappropriateness" is applied unbeknownst
to the user.

Picking the right candidates to sort lower according to
the context can be tricky, and once they are sent to the
end of the list a user might well wonder what's going on.

I come back, I think, to what I said in the beginning:
"the answer (IMHO) is better completion behavior."



  reply	other threads:[~2014-12-07 20:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07 16:14 Ordering of command completions Tom
2014-12-07 16:28 ` Lars Magne Ingebrigtsen
2014-12-07 17:36   ` Andreas Schwab
2014-12-07 17:42     ` Lars Magne Ingebrigtsen
2014-12-07 21:20       ` Lars Magne Ingebrigtsen
2014-12-07 21:33         ` Lars Magne Ingebrigtsen
2014-12-07 21:47           ` Lars Magne Ingebrigtsen
2014-12-07 22:00             ` Autoload cookies (was: Ordering of command completions) Lars Magne Ingebrigtsen
2014-12-07 22:03               ` Autoload cookies Daniel Colascione
2014-12-07 22:08                 ` Lars Magne Ingebrigtsen
2014-12-07 22:06               ` Andreas Schwab
2014-12-08  0:14               ` Autoload cookies (was: Ordering of command completions) Artur Malabarba
2014-12-07 22:05             ` Ordering of command completions Óscar Fuentes
2014-12-07 22:13               ` Lars Magne Ingebrigtsen
2014-12-08  0:53                 ` Artur Malabarba
2014-12-08  0:56                   ` Artur Malabarba
2014-12-07 18:33   ` Óscar Fuentes
2014-12-07 18:42     ` Drew Adams
2014-12-07 19:37       ` Óscar Fuentes
2014-12-07 20:10         ` Drew Adams [this message]
2014-12-07 20:24           ` Óscar Fuentes
2014-12-07 20:42             ` Drew Adams
2014-12-07 21:06               ` Óscar Fuentes
2014-12-07 21:26                 ` Drew Adams
2014-12-07 18:45     ` Lars Magne Ingebrigtsen
2014-12-07 18:59       ` Óscar Fuentes
2014-12-07 20:34         ` Lars Magne Ingebrigtsen
2014-12-07 20:47           ` Drew Adams
2014-12-07 21:20   ` Stefan Monnier
2014-12-07 21:25     ` Lars Magne Ingebrigtsen
2014-12-08  9:51   ` define "out-of-tree"? Stephen Leake
2014-12-08 18:04     ` Lars Magne Ingebrigtsen
2014-12-09 11:00       ` Richard Stallman
2014-12-09 20:00     ` Karl Fogel

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=2559f693-8b4b-40c7-b3b4-4b5d932c377c@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 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.