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: Limit what M-x TAB lists? Date: Thu, 26 Dec 2013 17:03:10 +0100 Message-ID: <87mwjn7g75.fsf@wanadoo.es> References: <87bo03itkn.fsf@building.gnus.org> <87wqirhbyw.fsf@building.gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1388073821 18387 80.91.229.3 (26 Dec 2013 16:03:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Dec 2013 16:03:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 26 17:03:44 2013 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 1VwDPT-0005J6-SQ for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2013 17:03:43 +0100 Original-Received: from localhost ([::1]:46087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwDPT-00087T-FK for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2013 11:03:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwDPK-00087M-MS for emacs-devel@gnu.org; Thu, 26 Dec 2013 11:03:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwDPC-00015P-6m for emacs-devel@gnu.org; Thu, 26 Dec 2013 11:03:34 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwDPC-00015L-0H for emacs-devel@gnu.org; Thu, 26 Dec 2013 11:03:26 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VwDPA-00055d-F9 for emacs-devel@gnu.org; Thu, 26 Dec 2013 17:03:24 +0100 Original-Received: from 225.red-81-44-202.dynamicip.rima-tde.net ([81.44.202.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Dec 2013 17:03:24 +0100 Original-Received: from ofv by 225.red-81-44-202.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Dec 2013 17:03:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 225.red-81-44-202.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:4Itv20mNxkRIwnx/6gf3CNMAST4= 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:166894 Archived-At: Lars Ingebrigtsen writes: > If these predicates become very complex, then `M-x fooTAB' would become > exceedingly slow, though... Instead of a predicate for every function, the usual Emacs idiom of "if it is a symbol, filter by mode, if it is a function, it must be a predicate returning non-nil if the command is applicable blah blah...". I'll bet that 99% of the commands fall in the "symbol" case, which is fast. >> Of course, this will require many changes in many packages before it >> becomes really useful. > > Yes, but modes could be converted gradually, and things would get better > and better as time passes... I'm definitely interested on this idea. It is annoying (as in "Emacs looks stupid and counterproductive") to always see useless candidates on M-x. If you put the underlying machinery in place, I volunteer for the command hunt. It would be nice if the annotations were backwards compatible, so they could be added to external packages without making them incompatible with past Emacs releases.