Subject: bug#78982: 30.1; find-program value mismatch between runtime and ~grep.el~ definition

From: Anush V <[email-masked]>
Date: Wed, 09 Jul 2025 17:03:41 -0400

> From: Eli Zaretskii <[email-masked]>
> Date: Wed,  9 Jul 2025 19:01:26 +0300
>
>> From: Anush V <[email-masked]>
>> Date: Wed, 09 Jul 2025 10:31:03 -0400
>> 
>> Hello Emacs maintainers,  emacs --no-init; 
>>  
>>   C-h v find-program 
>>  
>> Shows 
>>  
>>   find-program is a variable defined in ‘grep.el’. 
>>  
>>   Its value is 
>>   "/gnu/store/6i0xi5kf38jk54sw64akd3iv8scw5g6x-findutils-4.9.0/bin/find" 
>>  
>> However, the definition of find-program in `grep.el` is 
>>  
>>   (defvar find-program (purecopy 
>>   "/gnu/store/w4p913kmnga3xh80vx8vnkri42dcmqi3-findutils-4.9.0/bin/find") 
>>     "The default find program. 
>>   This is used by commands like `grep-find-command', `find-dired' 
>>   and others.") 
>>  
>> The find-program value differs, despite no user configuration being
>> loaded.  Could you confirm whether this is expected behavior or
>> a potential bug?
>
> The actual value of find-program set by grep.el is this:
>
>   (defvar find-program (purecopy "find")
>     "The default find program.
>   This is used by commands like `grep-find-command', `find-dired'
>   and others.")
>
> So the value is just "find", and some code somewhere assigned a
> different value to this variable, and you need to figure out which
> code did that and why.
>
> I don't see any Emacs bugs here.

The default definition in the upstream grep.el is indeed

  (defvar find-program (purecopy "find"))

The /gnu/store/... path I observed in my local grep.el appears to be
a modification introduced by the Guix packaging of Emacs.  I’ll follow
up with the Guix maintainers to understand their rationale for this
override.

Thank you for checking.  Please feel free to close this bug.

--
Regards,
Anush V