[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Per-mode obarray for M-x
From: |
Thierry Volpiatto |
Subject: |
Re: Per-mode obarray for M-x |
Date: |
Sun, 06 Mar 2011 19:43:37 +0100 |
User-agent: |
Gnus/5.110014 (No Gnus v0.14) Emacs/23.3 (gnu/linux) |
Scott Frazer <address@hidden> writes:
> On Sun, Mar 6, 2011 at 8:29 AM, Eli Zaretskii <address@hidden> wrote:
>>> Date: Sun, 6 Mar 2011 08:04:42 -0500
>>> From: Scott Frazer <address@hidden>
>>>
>>> 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