From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Spencer Boucher Newsgroups: gmane.emacs.devel Subject: Re: Leaving out non-applicable commands on Mx Date: Fri, 08 Jan 2016 17:54:30 -0800 Message-ID: References: <87mvszdp6b.fsf@gnus.org> <8737u9kv6f.fsf@russet.org.uk> <87fuy7hdc6.fsf_-_@wanadoo.es> <87bn8vh8q4.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452304505 23758 80.91.229.3 (9 Jan 2016 01:55:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2016 01:55:05 +0000 (UTC) Cc: =?utf-8?Q?=C3=93scar?= Fuentes , emacs-devel@gnu.org To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 09 02:54:46 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 1aHijs-0000kG-5B for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2016 02:54:44 +0100 Original-Received: from localhost ([::1]:38681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHijr-0000Z3-C6 for ged-emacs-devel@m.gmane.org; Fri, 08 Jan 2016 20:54:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHijn-0000Yx-Tm for emacs-devel@gnu.org; Fri, 08 Jan 2016 20:54:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHijj-0004k1-O9 for emacs-devel@gnu.org; Fri, 08 Jan 2016 20:54:39 -0500 Original-Received: from smtp.developermail.io ([88.198.18.23]:53214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHijj-0004jF-8U; Fri, 08 Jan 2016 20:54:35 -0500 Original-Received: by smtp.developermail.io Authentication-Results: smtp.developermail.io; dmarc=none header.from=spencerboucher.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spencerboucher.com; s=2015; t=1452304473; bh=tzIUDPyHwIi67LCVDlH5/mlMm9oClsn1QjuawIkuCHc=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=I0cpBGQt9dSsa1+7BgNhbBBeLWTGZihBvq5vjNsfMRv/TsfLT1utYFc4BWfc72fiF kucTwI+6Iu3rs6FUWxOlhbo6m6rQ8N4O7xe/QZpXjAP7mvQEDYRBc00GXELQf1X41p sXLdt0atayUuxs+IiStu5kqBcjAv4iZSJujwPC9Q= In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 88.198.18.23 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:197864 Archived-At: =20 Smex (https://github.com/nonsequitur/smex/) has a similar function=20 that limits to commands in the major mode=20 (`smex-major-mode-commands`).=20 John Wiegley writes: >>>>>> =C3=93scar Fuentes writes:=20 >=20 >> On the M-x prompt, the set of candidates is restricted to those=20 >> that make sense given the current context. Leaving out=20 >> functions that are specific to modes not enabled is a start. So=20 >> if you are editing a C file and press `M-x g' almost all gnus*=20 >> functions shall not be considered as candidates for completion.=20 >=20 > This sounds like a feature that should evolve first as a=20 > separate package in ELPA, and after proving itself, be=20 > considered for core. But I sense ways in which this could go=20 > wrong: expecting to find a command, failing for some=20 > undiscovered reason X, and then the user believing no such=20 > command exists.=20 >=20 >> The M-x interface can be an improvement over both keybindings=20 >> and the menu on terms of usability, given the correct methods,=20 >> but having thousands of irrelevant candidates every time you=20 >> invoke M-x is an inconvenience for that goal, not to say plain=20 >> dumb.=20 >=20 > Core Emacs behavior doesn't need to change to demonstrate this=20 > feature, does it? Write a new execute-extended-command and see=20 > if it works as well as you hope. -- Spencer Boucher