From: Jonas Bernoulli via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 69084@debbugs.gnu.org
Subject: bug#69084: 30; check-declare-directory chokes on lock files
Date: Tue, 20 Feb 2024 22:54:47 +0100 [thread overview]
Message-ID: <87frxm94yg.fsf@bernoul.li> (raw)
In-Reply-To: <86il2qw1tq.fsf@gnu.org>
Eli Zaretskii <eliz@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@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.
prev parent reply other threads:[~2024-02-20 21:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 19:26 bug#69084: 30; check-declare-directory chokes on lock files Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-15 8:48 ` Eli Zaretskii
2024-02-20 21:54 ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frxm94yg.fsf@bernoul.li \
--to=bug-gnu-emacs@gnu.org \
--cc=69084@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jonas@bernoul.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).