GNU bug report logs -
#69084
30; check-declare-directory chokes on lock files
Previous Next
Reported by: Jonas Bernoulli <jonas <at> bernoul.li>
Date: Mon, 12 Feb 2024 19:56:02 UTC
Severity: normal
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Feb 2025 19:34:51 -0800
with message-id <CADwFkm=qHpR=3YxLSKfLwcMW9WdUv_j1+96LRSjXauok-XiqHw <at> mail.gmail.com>
and subject line Re: bug#69084: 30; check-declare-directory chokes on lock files
has caused the debbugs.gnu.org bug report #69084,
regarding 30; check-declare-directory chokes on lock files
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
69084: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69084
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
`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.
Cheers,
Jonas
[Message part 3 (message/rfc822, inline)]
Jonas Bernoulli <jonas <at> bernoul.li> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> 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" <bug-gnu-emacs <at> gnu.org>
>>>
>>> `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?
>
> I've gone with the approach you suggested.
The patch was installed, so I'm closing this bug report.
This bug report was last modified 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.