bug#81481: 31.0.91; dired-test-filename-with-newline failures on 32-bit Solaris sparc

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
> From: Stephen Berman <[email protected]>
> Cc: [email protected],  [email protected],  [email protected]
> Date: Tue, 28 Jul 2026 13:39:16 +0200
> 
> On Tue, 28 Jul 2026 14:03:51 +0300 Eli Zaretskii <[email protected]> wrote:
> 
> > How should I test on Windows, given that my 'ls' is GNU 'ls' and that
> > by default 'ls' is not used on Windows?
> 
> Hm, I thought, evidently mistakenly, that any `ls' program did not work
> on MS-Windows and that's why ls-lisp is used for Dired there.

That's the default, yes.  But MS-Windows ports of GNU 'ls' do exist,
and I have such a port.  So I can use it if necessary for this
testing.

> >                                          Also, Windows doesn't allow
> > file names with embedded newlines.  So what and how should I test?
> 
> Now I'm not sure; if your Windows uses GNU `ls' what happens if you try
> to visit in Dired a directory listing a file name containing a newline,

There cannot be such file names on Windows, because Windows
filesystems don't allow that.

> > The patch LGTM otherwise.
> 
> I'm not sure about that either: in the tests I removed `(skip-when (memq
> system-type '(windows-nt ms-dos)))' because I thought `(skip-unless
> (dired--check-use-ls-dired))' would also skip the tests under Windows,
> but if GNU `ls' can be used there, I guess that wouldn't suffice and the
> skip-when sexp has to be restored?  And `dired--toggle-b-switch' and the
> code in `dired-internal-noselect' for displaying the warning about file
> names with newlines would have to explicitly exclude windows-nt and
> ms-dos?

You can check whether 'ls' is being used by testing
ls-lisp-use-insert-directory-program: its default is nil, but if the
user wants to use a ported 'ls', they can customize it to a non-nil
value.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.