From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: Per-mode obarray for M-x Date: Sun, 06 Mar 2011 19:43:37 +0100 Message-ID: <87mxl8ay3q.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1299437576 26114 80.91.229.12 (6 Mar 2011 18:52:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2011 18:52:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 06 19:52:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PwJ4Q-0000xm-VW for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2011 19:52:47 +0100 Original-Received: from localhost ([127.0.0.1]:40688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwIvv-0005iV-2T for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2011 13:43:59 -0500 Original-Received: from [140.186.70.92] (port=38192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwIvo-0005ho-FX for emacs-devel@gnu.org; Sun, 06 Mar 2011 13:43:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwIvm-0006Fl-Mz for emacs-devel@gnu.org; Sun, 06 Mar 2011 13:43:52 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:56929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwIvm-0006FR-As for emacs-devel@gnu.org; Sun, 06 Mar 2011 13:43:50 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PwIvl-0005KO-2k for emacs-devel@gnu.org; Sun, 06 Mar 2011 19:43:49 +0100 Original-Received: from 238.78.88-79.rev.gaoland.net ([79.88.78.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Mar 2011 19:43:49 +0100 Original-Received: from thierry.volpiatto by 238.78.88-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Mar 2011 19:43:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 238.78.88-79.rev.gaoland.net User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:s+anifjNoiO3mtPGqBs+ZDuf/rc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136819 Archived-At: Scott Frazer writes: > On Sun, Mar 6, 2011 at 8:29 AM, Eli Zaretskii wrote: >>> Date: Sun, 6 Mar 2011 08:04:42 -0500 >>> From: Scott Frazer >>> >>> Here's why I'd like this.  There are some commands I run somewhat >>> often, but they have long and/or difficult to remember names.  For >>> example auto-revert-tail-mode.  I am thinking as I type "Is it >>> auto-revert-tail-mode or auto-tail-revert-mode?" >> >> Does the problem still exist in the latest Emacs versions?  E.g., in >> Emacs 23.3, "M-x auto-tail TAB" completes to auto-revert-tail-mode >> without anything special you'd need to do.  The secret is that >> completion was lately extended, and is now much smarter.  In fact, >> there are a few non-default completion styles which will be even more >> aggressive than the above miracle. >> >> IOW, maybe your problem was already solved? >> > > While the new completion modes are cool and would help in that > particular instance, in my other example of "html" there would be many > hits to sort through. Those were just some illustrative examples > anyway, I'd still like the general mechanism. > > It (naively) seems not too difficult. There would be a buffer-local > obarray variable that gets populated during major-mode setup, a macro > that wraps creating a defun with a mode-specific prefix and interns > the defun (and the shortened version? Should the prefixed one go in > the 'main' obarray?) in the buffer-local obarray, then when you M-x it > looks in the buffer-local obarray first. Or something like that. > > Scott > > FYI anything have a nice M-x interface with much better completion than the vanilla M-x, a visible history, toggle help on commands, and most of the keybindings are shown. It have also the ability to use prefix-arg (C-u) at anytime,(i.e after hitting M-x) http://repo.or.cz/w/anything-config.git -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997