* bug#69084: 30; check-declare-directory chokes on lock files
@ 2024-02-12 19:26 Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-15 8:48 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-12 19:26 UTC (permalink / raw)
To: 69084
`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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#69084: 30; check-declare-directory chokes on lock files
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
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-02-15 8:48 UTC (permalink / raw)
To: Jonas Bernoulli; +Cc: 69084
> 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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#69084: 30; check-declare-directory chokes on lock files
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
0 siblings, 0 replies; 3+ messages in thread
From: Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-20 21:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 69084
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-20 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.