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 23:05:18 +0100 Message-ID: <87egsbt8td.fsf@wanadoo.es> References: <87d27vicq7.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417989967 15680 80.91.229.3 (7 Dec 2014 22:06:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Dec 2014 22:06:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 07 23:06:00 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 1Xxjxn-0001kk-Hz for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2014 23:05:59 +0100 Original-Received: from localhost ([::1]:59357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxjxn-0007Ka-0V for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2014 17:05:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxjxS-0007KM-PB for emacs-devel@gnu.org; Sun, 07 Dec 2014 17:05:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxjxL-0005xz-Mm for emacs-devel@gnu.org; Sun, 07 Dec 2014 17:05:38 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxjxL-0005xk-Db for emacs-devel@gnu.org; Sun, 07 Dec 2014 17:05:31 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XxjxK-0001V3-MA for emacs-devel@gnu.org; Sun, 07 Dec 2014 23:05:30 +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 23:05:30 +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 23:05:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 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:iQALhnxeh35pBqGEs5NI4jJYkg0= 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:179316 Archived-At: Lars Magne Ingebrigtsen writes: > I've done ten minutes of exploratory hacking to see whether it would be > a lot of work to get this to work. The `declare' solution turns out to > be rather trivial, apparently. Good. > The patch below is all that's needed to add a new `declare' form. And > then, after marking some stuff up, we just have to make the `M-x' > completion function examine the `mode' `function-get' value, and compare > it to the current modes in effect. A sorted array of pairs of symbols, perhaps? (, or the reverse, , with `mode' being `nil' when the function is not restricted.) > So if we decide to do something like this, getting the framework in > place is very little work. Annotating all of Emacs is a bit larger > (ahem), but it can be done gradually, and `M-x TAB' would work a bit > better each week... Annotating the functions is no small task, indeed. There are quite a few traps. However, my experience with ido+flx convinced me about the potential value of an effective M-x which, for commands that you use a few times a day at most, requires far less cognitive load than using its keybindings (when they have one) or M-x with the default completion system. [snip]