From unknown Sun Jun 22 00:32:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59115: 29.0.50; byte-recompile-directory incorrectly ignoring files Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Nov 2022 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59115@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16678707488637 (code B ref -1); Tue, 08 Nov 2022 01:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Nov 2022 01:25:48 +0000 Received: from localhost ([127.0.0.1]:35827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osDN5-0002FE-EK for submit@debbugs.gnu.org; Mon, 07 Nov 2022 20:25:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:40578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osDN3-0002F6-6n for submit@debbugs.gnu.org; Mon, 07 Nov 2022 20:25:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osDN2-0002aI-V6 for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 20:25:45 -0500 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osDMx-0004Ne-UH for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 20:25:43 -0500 Received: by mail-qk1-x729.google.com with SMTP id s20so8323682qkg.5 for ; Mon, 07 Nov 2022 17:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=KhywIMOdfzikSXyB8FvBZUNINr6cAWcfNCvuuOKpP4s=; b=J/azEcfQwMlFrcaI35rXgX1AAUtB39pWrV2lgyzqfWQalpzP6FzMFM5wS1Hr3ftA7Y pid1WbxAR4ltUkA+O5Pp9ba/btVhc20HAMEu6Mp7HRHWYAculeTFjViN5DlmjFSdCmIh APpWiCW5XLiynHLqB9sP0BtNx3K9lxGXGOLPIGLEaTLRi7HA4NPDb6KB5LmfSahri5n+ fwosgRymxw8OSP9fsHUkagATGizNYQJ8zqyx9MV445QdVIAT8JckkQZoVkPraxaNa+sC O2ZZFgIhfeqIhxwfEJ5FBiO8aMqchOol4Wdq9NUqzw6bST1deF7fOwun55wjlshv/D3p 0tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KhywIMOdfzikSXyB8FvBZUNINr6cAWcfNCvuuOKpP4s=; b=V/oj7sWHUnq0Uaq6SOdUmxxM88sng6gmGznxsq7F3N4RY856UBqDpfjBYofEgHrI61 1doxou5c1li0brkN3Iaw43fQBxiGmNwfbpviDNygt7sN6dsDs6y9aDVzxo+NdoYc2OtQ SEIRDDv7m8VP0Ii7YPaXJWrJX+vtpt8ho0mzfw08C9Yb0TpSkHdubLIqmsx4y1PBu29u 0+8ToXqoEe4jh9W7XqxPL2En76TAevsJ8LAC7EFkZ1zCCM23TI3Ea6OVGJRSE2/382Nc awmIOBRABUc9LjKbWt6pRxZoHLlVsAi3RTZRgm3+QPXxbyPjCtg++SOu5MpfkzX9oVRk Q6XQ== X-Gm-Message-State: ANoB5pmL3kWz2D6XRt6+MuWmykolMuLa8iOBNljJvs917iNgJQCJIfc/ h43dqbObPkjX9dj+Y3TisEYWGM0vFqk= X-Google-Smtp-Source: AA0mqf4d3xNidja5jS8TlkBPjeDMAF1QKc5CI0cy92f08z/e5xOh/bISXtsAy+j/ya2qdG2ay/fq/g== X-Received: by 2002:a37:b507:0:b0:6fa:f2f7:96ee with SMTP id e7-20020a37b507000000b006faf2f796eemr3488515qkf.494.1667870736242; Mon, 07 Nov 2022 17:25:36 -0800 (PST) Received: from nbook ([2601:82:c200:166d:7a0:14e6:e26:75bd]) by smtp.gmail.com with ESMTPSA id bs6-20020a05620a470600b006b61b2cb1d2sm8183402qkb.46.2022.11.07.17.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 17:25:35 -0800 (PST) User-agent: mu4e 1.9.1; emacs 29.0.50 From: No Wayman Date: Mon, 07 Nov 2022 19:49:58 -0500 Message-ID: <8735aukzfr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x729.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; format=flowed Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7 introduced a bug which will cause byte-recompile-directory to invert the semantics of the byte-compile-ingore-files option. To reproduce: 1. mkdir /tmp/bug/ && cd /tmp/bug/ 2. Copy an elisp file which would normally be byte-compiled into that directory 3. emacs -Q --batch --eval "(byte-recompile-directory default-directory 0 'force)" You should see output similar to: Checking /tmp/bug... Done (Total of 0 files compiled) In general the entire logic of byte-recompile-directory is messy. Two ifs without elses, lots of negated predicates, etc. I can see why the mistake was easy to overlook. This could be further refactored to make it easier to read by leveraging when/unless appropriately. Perhaps there's an argument for some abnormal hooks in place of those long chains of ad-hoc predicates, but I'm more interested in fixing the problem now. The attached patch fixes it for me. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-11-07 built on nbook Repository revision: 35221a7bd55e18244604376497097f4259c7351b Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Arch Linux --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-bytecomp.el-byte-recompile-directory-Fix-negated-ign.patch Content-Description: fix-byte-recompile-directory >From f2f8a3f09dc020550ef9cbd064db86082cf19a29 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Mon, 7 Nov 2022 19:57:34 -0500 Subject: [PATCH] bytecomp.el (byte-recompile-directory): Fix negated ignore logic Previous logic would only compile files which matched the byte-compile-ignore-files regular expression. --- lisp/emacs-lisp/bytecomp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4d258dab96..c685e5087f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1955,9 +1955,9 @@ byte-recompile-directory (not (auto-save-file-name-p source)) (not (member source (dir-locals--all-files directory))) ;; File is requested to be ignored - (string-match-p - (regexp-opt byte-compile-ignore-files) - source)) + (not (string-match-p + (regexp-opt byte-compile-ignore-files) + source))) (progn (cl-incf (pcase (byte-recompile-file source force arg) ('no-byte-compile skip-count) -- 2.38.1 --=-=-=-- From unknown Sun Jun 22 00:32:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59115: 29.0.50; byte-recompile-directory incorrectly ignoring files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Nov 2022 14:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: No Wayman , Philip Kaludercic Cc: 59115@debbugs.gnu.org Received: via spool by 59115-submit@debbugs.gnu.org id=B59115.16679181598076 (code B ref 59115); Tue, 08 Nov 2022 14:36:01 +0000 Received: (at 59115) by debbugs.gnu.org; 8 Nov 2022 14:35:59 +0000 Received: from localhost ([127.0.0.1]:36735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osPhm-00026B-UM for submit@debbugs.gnu.org; Tue, 08 Nov 2022 09:35:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osPhh-00025t-SS for 59115@debbugs.gnu.org; Tue, 08 Nov 2022 09:35:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osPhc-0003YL-E9; Tue, 08 Nov 2022 09:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qmYjZmXx0YbzUlk8c2T3Q0lQS26Kn+qx59v13mvn7ww=; b=UCwUdQJ0asw3 8sZEZrNxT642W9m7Jd+mQqVePA/CxXE9pIcyZmSbKhi80xU1k4Nb4f1kCCAwOCLLaa2egTw5P/JYr lVlHbijbMl8c4qr0JwCMhqGBdADav2lL4MLOKlJflqfEB+PQIfA6gGZbZQGBTppuxBWxyP+P9Tafp 8Nnr424Z8P+0VEzAVfs61nKH8fVe1ZPCva+NtDgdG38DTUQHvj3sYcWuOZOFlmQ4X9H14zCzfCWwL Np3FJ3YEpBndocsuvocEbLEoeRhpBHulWYKV2YLBA2qLl63ty3wDT1OgxVxVT7BPYG/cu5swJ/voP kD7fuMhTCMtL0cmu2gJdQA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osPhb-0003EP-T7; Tue, 08 Nov 2022 09:35:48 -0500 Date: Tue, 08 Nov 2022 16:35:34 +0200 Message-Id: <83iljpy0nd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <8735aukzfr.fsf@gmail.com> (message from No Wayman on Mon, 07 Nov 2022 19:49:58 -0500) References: <8735aukzfr.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: No Wayman > Date: Mon, 07 Nov 2022 19:49:58 -0500 > > Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7 > introduced a bug which will cause byte-recompile-directory to > invert the semantics of the byte-compile-ingore-files option. > > To reproduce: > > 1. mkdir /tmp/bug/ && cd /tmp/bug/ > 2. Copy an elisp file which would normally be byte-compiled into > that directory > 3. emacs -Q --batch --eval "(byte-recompile-directory > default-directory 0 'force)" > > You should see output similar to: > > Checking /tmp/bug... > Done (Total of 0 files compiled) > > > In general the entire logic of byte-recompile-directory is messy. > Two ifs without elses, lots of negated predicates, etc. I can see > why the mistake was easy to overlook. This could be further > refactored to make it easier to read by leveraging when/unless > appropriately. Perhaps there's an argument for some abnormal hooks > in place of those long chains of ad-hoc predicates, but I'm more > interested in fixing the problem now. > > The attached patch fixes it for me. Philip, can you look into tis, please? From unknown Sun Jun 22 00:32:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: No Wayman Subject: bug#59115: closed (Re: bug#59115: 29.0.50; byte-recompile-directory incorrectly ignoring files) Message-ID: References: <87fseso71h.fsf@posteo.net> <8735aukzfr.fsf@gmail.com> X-Gnu-PR-Message: they-closed 59115 X-Gnu-PR-Package: emacs Reply-To: 59115@debbugs.gnu.org Date: Wed, 09 Nov 2022 08:41:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1667983262-31594-1" This is a multi-part message in MIME format... ------------=_1667983262-31594-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #59115: 29.0.50; byte-recompile-directory incorrectly ignoring files 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 59115@debbugs.gnu.org. --=20 59115: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59115 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1667983262-31594-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 59115-done) by debbugs.gnu.org; 9 Nov 2022 08:40:08 +0000 Received: from localhost ([127.0.0.1]:38997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osgcx-0008CC-Jc for submit@debbugs.gnu.org; Wed, 09 Nov 2022 03:40:07 -0500 Received: from mout02.posteo.de ([185.67.36.66]:43009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osgcv-0008BZ-HB for 59115-done@debbugs.gnu.org; Wed, 09 Nov 2022 03:40:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 04612240106 for <59115-done@debbugs.gnu.org>; Wed, 9 Nov 2022 09:39:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667983200; bh=vVxZDs8gOdQ0KNC0cdVlyH7lx/zdsFSigyN8a8MB9fU=; h=From:To:Cc:Subject:Date:From; b=BsgHa0hMNlYnjv8m94h/HKj83RAgCo5fwvTky3PPHcubv1hrhhpbuo0E3Dl9qJSaB S5wLGq6VQ1t+R9MY+Yu/+kUOIlXBnKkJLBvs63mvq8jStkc9wmhUxVSjOFAgB31sFE FxlUmykVQTN07oL2OYr10ZBa0cW/LeP+yAsGP0pMmp5QRWH/k18rGVe84QqzIjXl2W 4MXJb3bN547xdzPOvsggqghKJ7wr+HWX3iUd+EYOYjL8gsCoP5GMu8Ce1wXhaOh3ac GnxsIUW/2WgSGynedA7Id55vf6tpb3nw7YGosQsf7e1txnRs1SqYFxKjQTOyARZa1k XeCOw6p5GHCGg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N6dgw6Ljjz9rxG; Wed, 9 Nov 2022 09:39:55 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#59115: 29.0.50; byte-recompile-directory incorrectly ignoring files In-Reply-To: <83iljpy0nd.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Nov 2022 16:35:34 +0200") References: <8735aukzfr.fsf@gmail.com> <83iljpy0nd.fsf@gnu.org> Date: Wed, 09 Nov 2022 08:39:54 +0000 Message-ID: <87fseso71h.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59115-done Cc: 59115-done@debbugs.gnu.org, No Wayman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: No Wayman >> Date: Mon, 07 Nov 2022 19:49:58 -0500 >> >> Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7 >> introduced a bug which will cause byte-recompile-directory to >> invert the semantics of the byte-compile-ingore-files option. >> >> To reproduce: >> >> 1. mkdir /tmp/bug/ && cd /tmp/bug/ >> 2. Copy an elisp file which would normally be byte-compiled into >> that directory >> 3. emacs -Q --batch --eval "(byte-recompile-directory >> default-directory 0 'force)" >> >> You should see output similar to: >> >> Checking /tmp/bug... >> Done (Total of 0 files compiled) >> >> >> In general the entire logic of byte-recompile-directory is messy. >> Two ifs without elses, lots of negated predicates, etc. I can see >> why the mistake was easy to overlook. This could be further >> refactored to make it easier to read by leveraging when/unless >> appropriately. Perhaps there's an argument for some abnormal hooks >> in place of those long chains of ad-hoc predicates, but I'm more >> interested in fixing the problem now. >> >> The attached patch fixes it for me. > > Philip, can you look into tis, please? Yes, the patch makes sense. I'm going to apply the patch. Thanks. ------------=_1667983262-31594-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Nov 2022 01:25:48 +0000 Received: from localhost ([127.0.0.1]:35827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osDN5-0002FE-EK for submit@debbugs.gnu.org; Mon, 07 Nov 2022 20:25:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:40578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osDN3-0002F6-6n for submit@debbugs.gnu.org; Mon, 07 Nov 2022 20:25:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osDN2-0002aI-V6 for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 20:25:45 -0500 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osDMx-0004Ne-UH for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 20:25:43 -0500 Received: by mail-qk1-x729.google.com with SMTP id s20so8323682qkg.5 for ; Mon, 07 Nov 2022 17:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=KhywIMOdfzikSXyB8FvBZUNINr6cAWcfNCvuuOKpP4s=; b=J/azEcfQwMlFrcaI35rXgX1AAUtB39pWrV2lgyzqfWQalpzP6FzMFM5wS1Hr3ftA7Y pid1WbxAR4ltUkA+O5Pp9ba/btVhc20HAMEu6Mp7HRHWYAculeTFjViN5DlmjFSdCmIh APpWiCW5XLiynHLqB9sP0BtNx3K9lxGXGOLPIGLEaTLRi7HA4NPDb6KB5LmfSahri5n+ fwosgRymxw8OSP9fsHUkagATGizNYQJ8zqyx9MV445QdVIAT8JckkQZoVkPraxaNa+sC O2ZZFgIhfeqIhxwfEJ5FBiO8aMqchOol4Wdq9NUqzw6bST1deF7fOwun55wjlshv/D3p 0tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KhywIMOdfzikSXyB8FvBZUNINr6cAWcfNCvuuOKpP4s=; b=V/oj7sWHUnq0Uaq6SOdUmxxM88sng6gmGznxsq7F3N4RY856UBqDpfjBYofEgHrI61 1doxou5c1li0brkN3Iaw43fQBxiGmNwfbpviDNygt7sN6dsDs6y9aDVzxo+NdoYc2OtQ SEIRDDv7m8VP0Ii7YPaXJWrJX+vtpt8ho0mzfw08C9Yb0TpSkHdubLIqmsx4y1PBu29u 0+8ToXqoEe4jh9W7XqxPL2En76TAevsJ8LAC7EFkZ1zCCM23TI3Ea6OVGJRSE2/382Nc awmIOBRABUc9LjKbWt6pRxZoHLlVsAi3RTZRgm3+QPXxbyPjCtg++SOu5MpfkzX9oVRk Q6XQ== X-Gm-Message-State: ANoB5pmL3kWz2D6XRt6+MuWmykolMuLa8iOBNljJvs917iNgJQCJIfc/ h43dqbObPkjX9dj+Y3TisEYWGM0vFqk= X-Google-Smtp-Source: AA0mqf4d3xNidja5jS8TlkBPjeDMAF1QKc5CI0cy92f08z/e5xOh/bISXtsAy+j/ya2qdG2ay/fq/g== X-Received: by 2002:a37:b507:0:b0:6fa:f2f7:96ee with SMTP id e7-20020a37b507000000b006faf2f796eemr3488515qkf.494.1667870736242; Mon, 07 Nov 2022 17:25:36 -0800 (PST) Received: from nbook ([2601:82:c200:166d:7a0:14e6:e26:75bd]) by smtp.gmail.com with ESMTPSA id bs6-20020a05620a470600b006b61b2cb1d2sm8183402qkb.46.2022.11.07.17.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 17:25:35 -0800 (PST) User-agent: mu4e 1.9.1; emacs 29.0.50 From: No Wayman To: bug-gnu-emacs@gnu.org Subject: 29.0.50; byte-recompile-directory incorrectly ignoring files Date: Mon, 07 Nov 2022 19:49:58 -0500 Message-ID: <8735aukzfr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x729.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; format=flowed Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7 introduced a bug which will cause byte-recompile-directory to invert the semantics of the byte-compile-ingore-files option. To reproduce: 1. mkdir /tmp/bug/ && cd /tmp/bug/ 2. Copy an elisp file which would normally be byte-compiled into that directory 3. emacs -Q --batch --eval "(byte-recompile-directory default-directory 0 'force)" You should see output similar to: Checking /tmp/bug... Done (Total of 0 files compiled) In general the entire logic of byte-recompile-directory is messy. Two ifs without elses, lots of negated predicates, etc. I can see why the mistake was easy to overlook. This could be further refactored to make it easier to read by leveraging when/unless appropriately. Perhaps there's an argument for some abnormal hooks in place of those long chains of ad-hoc predicates, but I'm more interested in fixing the problem now. The attached patch fixes it for me. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-11-07 built on nbook Repository revision: 35221a7bd55e18244604376497097f4259c7351b Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Arch Linux --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-bytecomp.el-byte-recompile-directory-Fix-negated-ign.patch Content-Description: fix-byte-recompile-directory >From f2f8a3f09dc020550ef9cbd064db86082cf19a29 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Mon, 7 Nov 2022 19:57:34 -0500 Subject: [PATCH] bytecomp.el (byte-recompile-directory): Fix negated ignore logic Previous logic would only compile files which matched the byte-compile-ignore-files regular expression. --- lisp/emacs-lisp/bytecomp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4d258dab96..c685e5087f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1955,9 +1955,9 @@ byte-recompile-directory (not (auto-save-file-name-p source)) (not (member source (dir-locals--all-files directory))) ;; File is requested to be ignored - (string-match-p - (regexp-opt byte-compile-ignore-files) - source)) + (not (string-match-p + (regexp-opt byte-compile-ignore-files) + source))) (progn (cl-incf (pcase (byte-recompile-file source force arg) ('no-byte-compile skip-count) -- 2.38.1 --=-=-=-- ------------=_1667983262-31594-1-- From unknown Sun Jun 22 00:32:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59115: 29.0.50; batch-byte-recompile-directory doesn't recompile file as expected References: <8735aukzfr.fsf@gmail.com> In-Reply-To: <8735aukzfr.fsf@gmail.com> Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Nov 2022 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59139@debbugs.gnu.org, 59115@debbugs.gnu.org Received: via spool by 59115-submit@debbugs.gnu.org id=B59115.166826891823204 (code B ref 59115); Sat, 12 Nov 2022 16:02:01 +0000 Received: (at 59115) by debbugs.gnu.org; 12 Nov 2022 16:01:58 +0000 Received: from localhost ([127.0.0.1]:48828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otsxC-00062A-8Z for submit@debbugs.gnu.org; Sat, 12 Nov 2022 11:01:58 -0500 Received: from smtp-18.smtpout.orange.fr ([80.12.242.18]:58663 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otsxA-00061x-BW for 59115@debbugs.gnu.org; Sat, 12 Nov 2022 11:01:57 -0500 Received: from [192.168.1.15] ([2.7.97.237]) by smtp.orange.fr with ESMTPA id tsx6opWgftk1atsx6osxwz; Sat, 12 Nov 2022 17:01:54 +0100 X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 12 Nov 2022 17:01:54 +0100 X-ME-IP: 2.7.97.237 Message-ID: <27609d06-c428-d6f4-e7a3-fa9427d99895@orange.fr> Date: Sat, 12 Nov 2022 17:01:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: fr, en-US From: David Ponce Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, If I correctly understood the code, a fix similar to the one applied for Bug#59115 is also needed for directories. Please find below another patch. Please also feel free to close this Bug#59139. diff --git a/bytecomp.el b/bytecomp.el index c685e50..c81c42e 100644 --- a/bytecomp.el +++ b/bytecomp.el @@ -1941,11 +1941,10 @@ also be compiled." ;; This file is a subdirectory. Handle them differently. (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) + (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) Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 15:34:15 2022 Received: (at control) by debbugs.gnu.org; 12 Nov 2022 20:34:15 +0000 Received: from localhost ([127.0.0.1]:49150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxCh-0004ls-7P for submit@debbugs.gnu.org; Sat, 12 Nov 2022 15:34:15 -0500 Received: from mail-oi1-f174.google.com ([209.85.167.174]:42655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxCc-0004jE-Kw for control@debbugs.gnu.org; Sat, 12 Nov 2022 15:34:10 -0500 Received: by mail-oi1-f174.google.com with SMTP id q186so7944161oia.9 for ; Sat, 12 Nov 2022 12:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=TrjVij3sYkRqVhV37O4lykU2uU0njzoaiIkXl/fI2B8=; b=LKBcSF5r+yfAsUwNEouQssdPsvNc0fS34P2QmRKd+w9aUtkLYlW9gPPjmSPKgpkdOi EVApRBFdevAGgDu1plBDzNiI3Xfjd2BKzmsCYiwcYVNGewJJKmo8R7YKZBupg/maR4EZ pVMTQ71gj1ky8IdtoQ0MUeOEkD5fh1duvbKZT+dYAnfg9EKozLDt/BHS6xCrlV3G74qG l0pBmn1fa01gk2kFfW+sUEx5yE4cQ8Z6ialerPJ9geWgakGVQ4bgbyCkDVTOatS+esdQ 5AY59Vx8GX/FV09vWxzjVzWUVQ3qnG5k97bxWqAeYxv3aIUJLpG0ieoeOhUjw0HCpmOt Ds8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TrjVij3sYkRqVhV37O4lykU2uU0njzoaiIkXl/fI2B8=; b=wvID2hXjmr/ciNu++fLVwkRcIt2fj6hIsdTKSOkIOeiKdne0o2c73tB/qmhdJ+4PMI Px+Qbrc/CT+VzhkQoq/o7vN5vpSu4s9A1D9upB3p2Gk/3/FVNXUW0+/WDg1JBGYUc6EG i7ezqIN8ux0nN0scI4iQ9Yy8+RpnJjADpFfyY9J+I8GfCt9D01Ndkzz5sDQRg2EwaysP DVxd+aGuF2bJll9xb9ZH+GDiotLH3o3xWiOJACivaBGzOqkUArt1MIF3UtcuehdBcYCu D0nAp3nCT5bNhI4c9KwR/vnqGNSTN3tsLZyahl0fVb5tov+so5NqmLfPKkgzhvENBUXT Y2gQ== X-Gm-Message-State: ANoB5pkj5i9VsrqcxYUK/0yxY775hICAyx8okhVaEvARwXwf4WABMoxh CgbWhP84zOZlox3G1Wc6ZDaOqvFNQ6GZR6q7LSE= X-Google-Smtp-Source: AA0mqf5je7ERuG2nEKktwS3aaDpUEEgrI1gj5FAE9LD+2p+m7ZY2Tb/lyzDTPi6nMMKLgzIZ8m1xnp88/JXMC0rCx7o= X-Received: by 2002:a54:4889:0:b0:359:dc32:4f9e with SMTP id r9-20020a544889000000b00359dc324f9emr3169410oic.92.1668285250408; Sat, 12 Nov 2022 12:34:10 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 12 Nov 2022 12:34:09 -0800 From: Stefan Kangas In-Reply-To: (German Pacenza's message of "Wed, 09 Nov 2022 10:58:41 -0300") References: X-Hashcash: 1:20:221112:59076-done@debbugs.gnu.org::WbM3+m6y+kucUQrO:3eZA MIME-Version: 1.0 Date: Sat, 12 Nov 2022 12:34:09 -0800 Message-ID: Subject: Re: bug#59076: 29.0.50; Byte-compiler fails since b5850ba3ae To: German Pacenza Content-Type: text/plain; charset="UTF-8" Bcc: control@debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 59076@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 59115 59076 thanks German Pacenza writes: > This bug has been fixed in Master a01024c859 > > Thanks. Thanks, closing.