From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69084: 30; check-declare-directory chokes on lock files Date: Thu, 15 Feb 2024 10:48:01 +0200 Message-ID: <86il2qw1tq.fsf@gnu.org> References: <87ttmd32m6.fsf@bernoul.li> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37023"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69084@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 09:49:05 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raXQX-0009RR-RJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 09:49:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raXQD-000819-Fn; Thu, 15 Feb 2024 03:48:45 -0500 Original-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 1raXQB-00080z-OZ for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:48:43 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raXQB-0002wi-G5 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:48:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raXQT-0000wB-L2 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Feb 2024 08:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69084 X-GNU-PR-Package: emacs Original-Received: via spool by 69084-submit@debbugs.gnu.org id=B69084.17079869123421 (code B ref 69084); Thu, 15 Feb 2024 08:49:01 +0000 Original-Received: (at 69084) by debbugs.gnu.org; 15 Feb 2024 08:48:32 +0000 Original-Received: from localhost ([127.0.0.1]:53967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXPz-0000t4-JP for submit@debbugs.gnu.org; Thu, 15 Feb 2024 03:48:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXPx-0000sI-Fm for 69084@debbugs.gnu.org; Thu, 15 Feb 2024 03:48:29 -0500 Original-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 1raXPY-0002nM-9S; Thu, 15 Feb 2024 03:48:04 -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=H+mGEihu4kEouRAobrawJNkldKd8jFEElpCnfUVIwtw=; b=rw8+OsNLIKHR AKojePcBey36L7tMpw4Am+3sUOTx9Xu+cCzEeRUTXNZf+EfQcse/WCSjUOopMRQT2JWAyd6DhSmQm ATxmZJdRNw/Gwlagv4u/0eFyLWEo/sNDQW1DJC+l2Ycb0UgekW8tp+WNuOa0BOVkprbrHWUtAO3q6 VuD0JeR5rZ//miumc9VWQc47mT8UyMk4O67CvlMMKmmCgxNcwY8hEbmccoxDw2uajjrNx9AOv+wOu XhRIKXQUUqp+i1BMz47iVW9LIPrWE2uwpqAA+BIb9GFHhOqE63P8T78K61jBVn5iyI+xnPw9+kdk9 YL2YdY4p50IW+AARtSYTrA==; In-Reply-To: <87ttmd32m6.fsf@bernoul.li> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280050 Archived-At: > Date: Mon, 12 Feb 2024 20:26:57 +0100 > From: Jonas Bernoulli via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > `check-declare-directory' chokes on lock files for libraries: > > check-declare-scan: Opening input file: No such file or directory, > /home/jonas/.config/emacs/lib/forge/lisp/.#forge-pullreq.el > > This simple change would take care of that: > > diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el > @@ -328,7 +328,7 @@ check-declare-directory > (setq root (directory-file-name (file-relative-name root))) > (or (file-directory-p root) > (error "Directory `%s' not found" root)) > - (let ((files (directory-files-recursively root "\\.el\\'"))) > + (let ((files (directory-files-recursively root "\\`[^.].*\\.el\\'"))) > (when files > (apply #'check-declare-files files)))) > > I am not sure this is acceptable as it would also skip over other hidden > files. IMO that would be okay; libraries arguably shouldn't be hidden > files. Why not exempt specifically the lock files, i.e. those whose basename begins with ".#"? That can be done with an additional test on the candidate file names returned by directory-files-recursively. WDYT?