From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Ordering of command completions Date: Sun, 07 Dec 2014 21:24:31 +0100 Message-ID: <87mw6ztdhc.fsf@wanadoo.es> References: <87zjaztimi.fsf@wanadoo.es> <0c854b9e-16a9-4147-8a82-3ad94b6790f0@default> <87r3wbtfn9.fsf@wanadoo.es> <2559f693-8b4b-40c7-b3b4-4b5d932c377c@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417983912 23542 80.91.229.3 (7 Dec 2014 20:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Dec 2014 20:25:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 07 21:25:05 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XxiO8-0004Lo-4r for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2014 21:25:04 +0100 Original-Received: from localhost ([::1]:59087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxiO7-00039Z-NJ for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2014 15:25:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxiNz-00039I-An for emacs-devel@gnu.org; Sun, 07 Dec 2014 15:25:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxiNr-0002Ci-F6 for emacs-devel@gnu.org; Sun, 07 Dec 2014 15:24:55 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxiNr-0002CO-7w for emacs-devel@gnu.org; Sun, 07 Dec 2014 15:24:47 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XxiNp-0004Ct-9H for emacs-devel@gnu.org; Sun, 07 Dec 2014 21:24:45 +0100 Original-Received: from 129.red-88-10-128.dynamicip.rima-tde.net ([88.10.128.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Dec 2014 21:24:45 +0100 Original-Received: from ofv by 129.red-88-10-128.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Dec 2014 21:24:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 129.red-88-10-128.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:c3CO5BgTNqRU3UsL4YMHNkpFYm8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:179297 Archived-At: Drew Adams writes: >> 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. Well, if the command definition comes with an attached statement about its applicable context ("when such mode is enabled") Emacs has a definitive method for the decision. >> 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. I was thinking about this scenario: the user is happily hacking on C code, then he starts Gnus, reads for a while, quits the Gnus session and comes back to his C hacking. Now M-x lists hundreds of gnus-* functions such as gnus-summary-expire-articles-now, which only applies to a Gnus Summary buffer. This is a net negative contribution to the usability of M-x. [snip] >> 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. Yes, it was. The OP asked about the ordering of candidates. Then Lars mentioned the old discussion about discarding the non-applicable ones, those that I call "noise". [snip]