Subject: bug#27300: Subject: 25.2; (E)Shell command completion fails when folder in PATH is not readable

From: Pierre Neidhardt <[email-masked]>
Date: Fri, 9 Jun 2017 19:08:27 +0100

- Make one PATH member non-readable

	$ chmod -r /path/to/some/bin/folder

- Start `emacs -Q`.
- M-x shell
- Press "e<TAB>" (any letter will do)

I get the following error:

	(file-error "Opening directory" "Permission denied" "/path/to/some/bin/folder")

While a warning could make sense, a non-readable folder should not prevent
completion from working.

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
 -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix