emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: master 927b885 1/3: Disable filtering of commands i


From: Drew Adams
Subject: RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion
Date: Wed, 17 Feb 2021 22:18:00 +0000

> Also maybe a key to toggle filtering in the already active completion
> (and a key to toggle sorting).

For filtering, why toggle instead of cycle, or
completion-choose a sort order?  I.e., why allow
for only two choices?

> I'd like also to suggest to filter out
> commands having "r" in their interactive specs - they signal
> an error when the region is not active, so no need to show them.

Are you sure they raise an error?

(defun foo (&optional beg end)
  (interactive "r")
  (message "FOO"))

I also think it's misleading to base filtering on
an `interactive' form that uses a string.  That's
inherently fragile/limiting.  It won't apply to a
form that evaluates a sexp to provide the args.
The resulting incoherence will confuse users.

> Also filter out commands with "*" in read-only buffers.

Same problem.  Relying on a string arg to `interactive'
is not a great idea, I think.

> `describe-command' is a very good idea for searching
> and discovering commands.

I mentioned that I defined that long ago.  But I'll
also mention that `describe-function' with a prefix
arg already gives you that behavior.  Oops!  Nope,
that too is something I defined long ago in
`help-fns+.el'.

Similarly, I defined `describe-option', and a prefix
arg to (my definition of) `describe-variable' limits
choices to user options (like `describe-option').



reply via email to

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