GNU bug report logs - #64652
28.2; Adding a property bug on Windows 11

Previous Next

Package: emacs;

Reported by: Senki Jun <senkijun <at> gmail.com>

Date: Sat, 15 Jul 2023 16:45:01 UTC

Severity: normal

Found in version 28.2

Full log


Message #104 received at 64652 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: senkijun <at> gmail.com, ruijie <at> netyu.xyz, Eli Zaretskii <eliz <at> gnu.org>,
 64652 <at> debbugs.gnu.org
Subject: Re: bug#64652: 28.2; Adding a property bug on Windows 11
Date: Sun, 16 Jul 2023 13:07:01 +0200
16 juli 2023 kl. 12.25 skrev Ihor Radchenko <yantar92 <at> posteo.net>:

> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
>>> Hmm... One way could be modifying regexps to something like
>>> [Pp][Rr][Oo][Pp][Ee][Rr][Tt][Ii][Ee][Ss]. May Emacs provide something
>>> like (regexp-case-quote REGEXP &optional CASE-TABLE)?
>> 
>> What would regexp-case-quote do with REGEXP?
>> 
>> Regarding [Pp][Rr] etc.: does this have any significant effect on
>> performance, due to use of character classes?

Yes, that would be substantially slower. The regexp engine combines sequences of literal characters into literal strings that are matched atomically, without either the overhead of individual NFA ops or pushing backtracking points on the NFA stack for each character.

Indeed a quick micro-benchmark bears that out.

How much that affects performance overall is a different matter and can only be answered by measuring.

In general we should make an effort to stop the user's locale leaking into elisp code logic. Ideally, case-folding should be property of a regexp or part of it, not controlled by a user-customisable global variable.

I'm just waiting for the horde of irate Turkish Pascal programmers to complain about broken font-lock.





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

Previous Next


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