Subject: Re: bug#59722: 30.0.50; project-find-regexp searches project-ignored files

From: Dmitry Gutov <[email-masked]>
Date: Thu, 1 Dec 2022 01:30:03 +0200

On 01/12/2022 01:20, Rudolf Adamkovič via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:

>> What backend are you using? If it's (most likely) project-vc, then the
>> variable you must be looking for is 'project-vc-ignores'.
> 
> I do use the Git (VC) backend.  Correction:
> 
> When I set the dir locals file to
> 
>      ((nil . ((project-vc-ignores . ("apps/**/*.scm")))))
> 
> I face the problem where C-x p f ignores the files in the "apps"
> directory, as expected, but C-x p g does not.

Okay.

I wonder how that could be possible: project-find-regexp (that if what 
you have 'C-x p g' bound to, right?) does the search across the files 
returned by 'project-files'. So there is just one place that interprets 
the ignores' list and produces the list of files, and both 
project-find-file and project-find-regexp consume the result.

Can you step through 'project-find-regexp' with edebug? Does the return 
value of 'project-files' (saved to 'files') contain the extra entries?

Or are you calling 'project-find-regexp' with a prefix, which switches 
it to a different mode (the 'project--files-in-directory' branch)?