GNU bug report logs - #58950
[PATCH] * lisp/subr.el (buffer-match-p): Optimise performance

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Tue, 1 Nov 2022 19:12:02 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 58950 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#58950: [PATCH] * lisp/subr.el (buffer-match-p): Optimise performance
Date: Fri, 6 Jan 2023 23:41:43 +0200
On 06/01/2023 13:17, Mattias EngdegÄrd wrote:
> 5 jan. 2023 kl. 13.55 skrev Dmitry Gutov <dgutov <at> yandex.ru>:
> 
>> I'm not sure how we'd reach the same goals with plain old Elisp (structured editing in particular -- in Customize).
> 
> No enemy of little DSLs in principle but is that structural editing the main rationale now?

I think so? And the fact that it's more limited than Elisp means the 
values have to be uniform-ish. As a result they're easier to quickly grasp.

> (I wish we had (byte-)compiled elisp functions carrying their own source, either as s-exp, string of formatted source text, or source file reference -- that would allow for sensible editing in Customise without performance penalty. But Santa gave me a wool jumper instead, that's nice too.)

We kind of have that already, if we just made the type for be 'sexp', or 
a Lisp form. With all the freedom associated with it, just lower 
performance compared to a compiled function.

Would that look like a good choice for e.g. font-lock-global-modes? I 
don't think the performance hit would be a problem for that use.

> Regarding buffer-match-p, the fact that `not` actually means `nor` is a bit odd (we don't do that elsewhere), as well as arbitrary (why not `nand` etc) and undocumented.

Yeah, it's a wrinkle. I'm on the fence regarding changing it, though, 
for compatibility and ergonomical reasons (it's easier for the user to 
avoid typing a dot).

But I'm not married to it either.




This bug report was last modified 2 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.