emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limit what M-x TAB lists?


From: Óscar Fuentes
Subject: Re: Limit what M-x TAB lists?
Date: Thu, 26 Dec 2013 17:03:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:

> If these predicates become very complex, then `M-x fooTAB' would become
> exceedingly slow, though...

Instead of a predicate for every function, the usual Emacs idiom of "if
it is a symbol, filter by mode, if it is a function, it must be a
predicate returning non-nil if the command is applicable blah blah...".
I'll bet that 99% of the commands fall in the "symbol" case, which is
fast.

>> Of course, this will require many changes in many packages before it
>> becomes really useful.
>
> Yes, but modes could be converted gradually, and things would get better
> and better as time passes...

I'm definitely interested on this idea. It is annoying (as in "Emacs
looks stupid and counterproductive") to always see useless candidates on
M-x. If you put the underlying machinery in place, I volunteer for the
command hunt.

It would be nice if the annotations were backwards compatible, so they
could be added to external packages without making them incompatible
with past Emacs releases.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]