Subject: bug#64897: 29.0.91; Bug (and patch) in find-dired-with-command

From: Michael Albinus <[email-masked]>
Date: Sun, 13 Aug 2023 11:33:09 +0200

Eli Zaretskii <[email-masked]> writes:

Hi Eli,

>> GNU ls has changed its default how to quote special characters in file
>> names. Likely, you've got a recent version of coreutils on your machine.
>>
>> This change has raised controversioal discussions, but now it
>> exists. See <https://www.gnu.org/software/coreutils/quotes.html>.
>
> Maybe we should invoke 'ls' via a pipe, rather than PTY, so that this
> change (which AFAIU we don't need in Dired) doesn't affect us?  Of
> course, this will probably not help remote invocations.  But maybe we
> should inject "QUOTING_STYLE=literal" into the environment in those
> cases?

I don't believe we must change anything. Calling find-name-dired from
emacs -Q, it ends up in "find . \( -name <pattern> \) -ls". This works
as expected, because the -ls argument of find is not affected by the
change in GNU ls.

The problem happens only, if people like Michael prefer to use the ls
command directly. In that case they are responsible themselves to use
proper ls arguments, matching the ls version on their system.

Best regards, Michael.