GNU bug report logs -
#64985
29.1; [PATCH] Byte-compilation of packages via package-vc doesn't correctly handle .elpaignore wildcards
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Tue, 1 Aug 2023 06:21:02 UTC
Severity: normal
Tags: patch
Found in version 29.1
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 64985 <at> debbugs.gnu.org (full text, mbox):
>> There might be another way to do this, e.g. so that we could optimize
>> the regexp, but I'm not sure if Emacs has anything to optimize a list of
>> *regexp* alternatives (rather than a list of *string* alternatives). I
>> tested out 'rx' too, but no luck there either. This seemed like the best
>> I could do without more extensive changes, which I wanted to avoid for
>> the 29 branch.
>>
> Note: 'rx' (well, 'rx-to-string') would work here too, but it didn't
> optimize the list of regexp alternatives, and I found the code to be
> harder to read (though I could just be doing it in a clumsy way).
rx doesn't attempt to left-factorise disjunctive patterns unless they are all literal strings or characters. I have considered a generalisation, but it would be done on the rx level and so wouldn't solve your immediate problem here.
An alternative would be to match against
(mapconcat #'identity byte-compile-ignore-files "\\|") ...)
This bug report was last modified 1 year and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.