emacs-devel
[Top][All Lists]
Advanced

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

Re: Ordering of command completions


From: Óscar Fuentes
Subject: Re: Ordering of command completions
Date: Sun, 07 Dec 2014 23:05:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> 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? (<fn, mode>, or the
reverse, <mode, fn>, 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]




reply via email to

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