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: Leaving out non-applicable commands on Mx Date: Sat, 09 Jan 2016 01:55:47 +0100 Message-ID: <87bn8vh8q4.fsf@wanadoo.es> References: <87mvszdp6b.fsf@gnus.org> <8737u9kv6f.fsf@russet.org.uk> <87fuy7hdc6.fsf_-_@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1452300978 8201 80.91.229.3 (9 Jan 2016 00:56:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2016 00:56:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 09 01:56:06 2016 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 1aHhp7-0001w3-Fe for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2016 01:56:05 +0100 Original-Received: from localhost ([::1]:38601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHhp6-0006QU-Ix for ged-emacs-devel@m.gmane.org; Fri, 08 Jan 2016 19:56:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHhp1-0006Ls-NR for emacs-devel@gnu.org; Fri, 08 Jan 2016 19:56:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHhoy-0006e3-JH for emacs-devel@gnu.org; Fri, 08 Jan 2016 19:55:59 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:42799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHhoy-0006du-CD for emacs-devel@gnu.org; Fri, 08 Jan 2016 19:55:56 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aHhow-0001nV-U6 for emacs-devel@gnu.org; Sat, 09 Jan 2016 01:55:55 +0100 Original-Received: from 126.red-88-21-15.staticip.rima-tde.net ([88.21.15.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jan 2016 01:55:54 +0100 Original-Received: from ofv by 126.red-88-21-15.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jan 2016 01:55:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 126.red-88-21-15.staticip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:Y/CkC4j17nYHmUZFG495C49lsec= 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:197861 Archived-At: John Wiegley writes: >>>>>> Óscar Fuentes writes: > >>> We've discussed before adding mechanisms for leaving mode-specific commands >>> out, but I was apparently the only one enthusiastic about it... > >> You sketched a possible implementation. If you are interested on completing >> the part that requires a smart hacker, I'll do the part that requires a dumb >> one :-) > > What is this feature suggestion again? On the M-x prompt, the set of candidates is restricted to those that make sense given the current context. Leaving out functions that are specific to modes not enabled is a start. 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. This is important with 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. 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.