Subject: Re: bug#53739: 28.0.91; "C-x d" fails when "emacs -Q" starts on NetBSD with plan9/bin on head of PATH

From: Eli Zaretskii <[email-masked]>
Date: Thu, 03 Feb 2022 09:22:15 +0200

> Date: Wed, 2 Feb 2022 22:12:31 +0000 (UTC)
> From: Van Ly <[email-masked]>
> 
> For the following interactive shells:
> 
> * /bin/sh
> * /usr/pkg/bin/zsh
> * /usr/local/plan9/bin/rc
> 
> when "/usr/local/plan9/bin" is at the head of the PATH environment
> variable and entry to GNU Emacs is by "emacs -Q", inside GNU Emacs the
> dired command fails
> 
> # steps to reproduce behavior
> * start by 'emacs -Q'
> * list directory by 'C-x d'
> 
> # observed behavior
> # minibuffer echo area says
> 
> > insert-directory: Listing directory failed but `access-file' worked

I guess the version of 'ls' there is incompatible or something?  The
message means that 'ls' exited with a non-zero status for some reason.
Please investigate more what went wrong there and report here the
details, so we could decide whether we want to support "plan9/bin"
idiosyncrasies, whatever they are.  Stepping with Edebug through
insert-directory should help  you understand what's going on.

Also, please explain what you mean by "for the following interactive
shells".  How does the interactive shell enter this picture?  And what
is the value of shell-file-name in the session where "C-x d" fails?