Subject: Re: bug#63142: 30.0.50; QUOTING_STYLE can break dired

From: Michael Albinus <[email-masked]>
Date: Fri, 05 May 2023 14:03:13 +0200

Eli Zaretskii <[email-masked]> writes:

Hi,

>> This change breaks tramp-tests on MacOS (and, I presume, BSDs) where `ls` accepts neither `--dired` nor `-N`. see appended test log.
>
> AFAIU, we should use --dired only when 'ls' supports it, and we now
> use -N under the same conditions.  Is that not what happens?

This still happens.

>> Should we reopen this bug or open a new one?
>
> I'd like Michael to chime in first.

Well, we're speaking about tramp-sh-handle-insert-directory. This does
the following:

- Check, whether the remote ls command supports "--quoting-style=literal
  --show-control-chars" or "-w" (for *BSD). If yes, add this to SWITCHES.

- Check, whether the remote ls command supports "--dired". If not, remove
  "--dired" from SWITCHES.

It doesn't know anything about "-N". So I propose to remove "-N" from
switches unconditionally in Tramp.

Best regards, Michael.