João Távora writes: > On Tue, Nov 1, 2022 at 10:48 AM Philip Kaludercic > wrote: > >> >> BTW, if there are major objections to the language, I should point out >> that the new `buffer-match-p' in Emacs 29 uses the same language and has >> already found usage in a number of spots in core Emacs. There would >> still be time to address any issues you might have, and avoid a >> long-term mistake. >> > > For me, it looks like match-buffers is reinventing > cl-remove-if-not and match-buffer-p is reinventing ... unary predicate > function of a buffer? You could say that, though I would argue it is an easier way to express common predicates, while not making anything else more complicated. E.g. `display-buffer-alist' makes use of it to associate display-buffer rules with buffers. Now you can add ((major-mode . help-mode) display-buffer-in-side-window) instead of trying to match being a regular expression to catch all *Help* buffer names of a function along the lines of (lambda (buf _alist) (with-current-buffer buf (derived-mode-p 'help-mode))) > I'm not fond of these mini-languages because they're less expressive, they > end up being only minimally less complicated and bug-prone, they can't > automatically be byte-compiled for efficiency, and they can't automatically > be byte-compiled for correctness/diagnostics. If one makes a mistake, > the backtrace is much more complicated. I agree in principle, but this should be alleviated by using a lambda function as a predicate. The above check still works and can be used anywhere you would use `buffer-match-p'. > So these mini-languages may make sense to define filters in thunderbird or > something, but throwing Elisp away here generally doesn't make sense to me. > > But there may be exceptions (although this project.el one doesn't seem one > of them) so why don't you show examples of use of these new helpers and > so we can compare side by side with the Elisp-only alternative. I am biased, but I believe that the language could even find more use in project.el, by having `project-buffers' just call `match-buffers' with a special `buffer-match-p' predicate. Here is a sketch of how that could look like (I haven't tested it yet):