bug#40119: [PATCH] Make compilation-mode regexp matching case-sensitive

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#40119: [PATCH] Make compilation-mode regexp matching case-sensitive

Mattias Engdegård-2
Since the regexps being matched in compilation-mode are numerous, independently written, and often intersect, it makes sense to use case-sensitive matching. After all, compiler messages do not change case between runs.

Doing so improves performance: case-insensitive matching is slightly slower and stricter matching allows for earlier rejection. It also reduces collisions, and it is probably what everybody assumed anyway.


0001-Make-compilation-mode-regexp-matching-case-sensitive.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#40119: [PATCH] Make compilation-mode regexp matching case-sensitive

Eli Zaretskii
> From: Mattias Engdegård <[hidden email]>
> Date: Wed, 18 Mar 2020 19:30:23 +0100
> Cc: [hidden email]
>
> 18 mars 2020 kl. 19.05 skrev Eli Zaretskii <[hidden email]>:
>
> > What if we are wrong and some compiler needs case-insensitive
> > matching?  Your change makes it impossible to get back the old
> > behavior, not even optionally.
>
> Do you mean that we should add a defcustom to permit the user to control the behaviour, or that doing so is impossible once rules are added which rely on the case-sensitivity?

The former.

> Either way, it seems much more likely that it is case-insensitivity that is an obstacle to adding new rules, not the contrary.

I don't understand what adding new rules has to do with this.  I'm
talking about a specific rule that needs to be matched
case-insensitively.

> Could you give an example of what such a hypothetical compiler needing case-insensitive matching would look like?

Sorry, I don't understand the question.  What I meant is that some of
the rules were written _knowing_ that the match is case-insensitive,
and will fail to match if that is changed.  I don't think there's
anyone around here that can claim detailed knowledge of every rule and
the compiler(s) that use them, so we have no one to ask whether this
danger is real or imaginary.



Reply | Threaded
Open this post in threaded view
|

bug#40119: [PATCH] Make compilation-mode regexp matching case-sensitive

Mattias Engdegård-2
No objections detected -- patch pushed to master.




Reply | Threaded
Open this post in threaded view
|

bug#40119: [PATCH] Make compilation-mode regexp matching case-sensitive

Dmitry Gutov
In reply to this post by Eli Zaretskii
On 18.03.2020 21:29, Eli Zaretskii wrote:
> What I meant is that some of
> the rules were written_knowing_  that the match is case-insensitive,
> and will fail to match if that is changed.

Suppose some author discovers that about one of their rules (or
several). Would it be too hard to fix those rules instead of changing
the user option?

Because said variable can affect all other rules as well. And other
compilation modes, if used incorrectly.