Subject: Re: bug#59023: 26.1; Setting find-name-arg to -regex breaks dired-do-find-regexp and dired-do-find-regexp-and-replace

From: Dmitry Gutov <[email-masked]>
Date: Mon, 14 Nov 2022 02:27:54 +0200

Hi!

On 04.11.2022 20:01, [email-masked] wrote:
> Steps to reproduce:
> 1. Create a file containing the string "hello".
> 2. Set the variable "find-name-arg" to "-regex" via Easy Customization.
> 3. Visit the directory containing the file created in step 1 in dired.
> 4. Mark the file created in step 1 in dired.
> 5a. Execute "dired-do-find-regexp" on the marked file by pressing "A"
>      and enter "hello" in the prompt.
>      => Function reports "user-error: No matches for: hello" but I
>         expected it to open an "*xref*" buffer listing the file created
>         in step 1.
> 5b. Execute "dired-do-find-regexp-and-replace" on the marked file by
>      pressing "Q", enter "hello" in the first prompt and an arbitrary
>      replacement string in the second prompt.
>      => Function reports "user-error: No matches for: hello" but I
>         expected it to open the file created in step 1 with the option to
>         replace "hello" with the replacement string.

Thanks for the report. It seems we shouldn't use the customized value in 
project--files-in-directory, just the base value.

I've pushed the fix to master, it should appear in GNU ELPA soon as 
well, in 'project' version 0.8.3.