Subject: bug#59236: closed (Re: bug#59236: 29.0.50; [PATCH] bytecomp.el: (byte-recompile-directory): Fix negated ignore)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 13 Nov 2022 07:23:02 +0000

Your bug report

#59236: 29.0.50; [PATCH] bytecomp.el: (byte-recompile-directory): Fix negated ignore

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59236: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59236
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59236: 29.0.50; [PATCH] bytecomp.el: (byte-recompile-directory): Fix negated ignore
From: Philip Kaludercic <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], lin Sun <[email-masked]>
Date: Sun, 13 Nov 2022 07:22:36 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

> merge 59236 59139
> thanks
>
>> Date: Sun, 13 Nov 2022 04:26:45 +0000
>> From:  lin Sun via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> The patch 8638aace3f try to use the variable
>> `byte-compile-ignore-files`, but the logic is inverse for both file
>> and directory parts;
>> and the patch a01024c859 fix the logic for file part;
>> this patch try to fix the logic for directory part.
>> 
>> Please help review and apply it. Thanks.
>
> This is a duplicate of bug#59139.
>
> Philip, can you please take care of this?

I had applied the patch that was identical to the one proposed here, but
it appears my message confirming that wasn't sent out.  I'll update both
bug reports.

Subject: 29.0.50; [PATCH] bytecomp.el: (byte-recompile-directory): Fix negated ignore
From: lin Sun <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 13 Nov 2022 04:26:45 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

The patch 8638aace3f try to use the variable
`byte-compile-ignore-files`, but the logic is inverse for both file
and directory parts;
and the patch a01024c859 fix the logic for file part;
this patch try to fix the logic for directory part.

Please help review and apply it. Thanks.

Best regards
Lin
From 1e00f1ab7ea8171e99068486d6b93ba62e905777 Mon Sep 17 00:00:00 2001
From: Lin Sun <[email-masked]>
Date: Sun, 13 Nov 2022 00:00:22 +0000
Subject: [PATCH] * bytecomp.el: (byte-recompile-directory): Fix negated ignore
 logic

Should not append the sub-directories when match the
byte-compile-ignore-files regular expression.  (Bug#59115)
---
 lisp/emacs-lisp/bytecomp.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c685e5087f..f11c4efc6c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1942,11 +1942,11 @@ byte-recompile-directory
 		      (or (null arg) (eq 0 arg)
 			  (y-or-n-p (concat "Check " source "? ")))
 		      (setq directories (nconc directories (list source)))
-                      ;; Directory is requested to be ignored
-                      (string-match-p
-                       (regexp-opt byte-compile-ignore-files)
-                       source)
-                      (setq directories (nconc directories (list source))))
+		      ;; Directory is requested to be ignored
+		      (not (string-match-p
+			    (regexp-opt byte-compile-ignore-files)
+			    source))
+		      (setq directories (nconc directories (list source))))
                ;; It is an ordinary file.  Decide whether to compile it.
                (if (and (string-match emacs-lisp-file-regexp source)
 			;; The next 2 tests avoid compiling lock files
-- 
2.20.5