emacs-devel
[Top][All Lists]
Advanced

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

Re: Current mode command discovery


From: Alan Mackenzie
Subject: Re: Current mode command discovery
Date: Sun, 14 Feb 2021 20:25:14 +0000

Hello, Óscar

On Sun, Feb 14, 2021 at 20:53:18 +0100, Óscar Fuentes wrote:
> Eli Zaretskii <eliz@gnu.org> writes:

> >> Now that we have mode markup, should there be a command like `M-x', but
> >> instead lists only those commands that are specifically relevant to the
> >> current buffer?

> > Like I said before: instead of removing what seems irrelevant, make
> > them appear after the relevant parts.  Otherwise we will lose
> > information when we guess wrong (which is an easy mistake to make,
> > since the assumption that the user always wants only the commands from
> > the current major mode is not always true).

> That defeats the purpose of the feature, which is showing what is
> relevant and ignore the rest.

> Listing the irrelevant commands would only serve to confuse and overload
> the user.

For the way I use M-x, I absolutely need what you call "irrelevant"
commands.  Suggesting that these "confuse and overload" me is not a nice
thing to do.

> Those who insist on using M-x to discover things while working on
> random buffers (something that seems quite bizarre to me, to be honest)
> still can disable the filtering or, better, learn to use the Emacs help
> system.

Ditto for this paragraph.  My memory is imperfect, and that includes
memory of command names.  I routinely find exact names from hazy half
memories by typing in M-x, the bits I think I remember, the occasional
asterisk, and hit the TAB key.  This works reasonably well.  And for this
process, I don't want to have to switch to, or create a "relevant"
buffer.  I will certainly be disabling this filtering.  As for learning
to use the help system, that's hardly a serious suggestion.

> >> This would only be commands that have been marked for the current major
> >> mode and any active minor modes, I guess?

> > What about primitives? they are relevant in any mode.

> Here I think that Lars is proposing an special command that just shows
> those commands marked as related to the current active modes. Regular
> M-x will still show the commands which are relevant in general, in
> addition to the specific ones.

There are around 11,380 commands in just the Emacs Lisp sources.  I'm not
sure it's practical to classify that number of commands as relevant for
all the scenarios the new feature is intended for.  It's a great deal of
work.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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