[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smarter M-x that filters on major-mode
From: |
Stefan Monnier |
Subject: |
Re: Smarter M-x that filters on major-mode |
Date: |
Thu, 11 Feb 2021 11:05:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> And since more than 90% of the commands will eventually get this sort of
> annotation (I didn't actually count), that seemed kinda inefficient.
That's indeed possible, but I'm not sure it will be the case (it seems
like a lot of work to get there, unless we can come up with some way to
automatically infer most of those predicates somehow, or to specify
them "globally" by grouping in the source code commands that share the
same predicate, or something).
But since you're touching the `interactive-form` part, it's a good
opportunity to mention that some commands would benefit from being able
to specify not just how to build the arguments for interactive use but
also what to do with the result (such as how to display it).
So there's a case to be made that we should allow the `interactive-form`
to specify a generic wrapper: a function that takes a single argument
(the function to be called) and is then in charge of building the
arglist, calling the function, and do what it wants with the result.
I'm not sure how best to integrate this with the kind of predicates we're
discussing here...
Stefan
- Smarter M-x that filters on major-mode, (continued)
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Eli Zaretskii, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode,
Stefan Monnier <=
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Óscar Fuentes, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Óscar Fuentes, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Jose A. Ortega Ruiz, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/12
- Re: Smarter M-x that filters on major-mode, jao, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Stefan Kangas, 2021/02/12