Subject: bug#60982: 28.2; Behavior of read-file-name-default / read-file-internal

From: Frederic Santos <[email-masked]>
Date: Sat, 21 Jan 2023 07:43:51 +0100 (CET)

Hi,

Not sure if that is a bug or not, but I noticed a strange behavior of find-file in some specific situations with Emacs 28.2. Say that I have three files in a given directory:

.
├── landmarks2.tps
├── landmarks.tps
└── script.R

1. Open Emacs with emacs -q in this directory.
2. Doing C-x C-f TAB proposes only one candidate, script.R, when I obviously expected three candidates. (Then, if you start typing 'l' in the minibuffer, you indeed get landmarks.tps and landmarks2.tps as candidates, but I'm not sure why they are not proposed initially.)

All the best,
F.

--

In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-09-12 built on frederik
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Manjaro Linux

Configured using:
 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd
 --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2
 -Wformat -Werror=format-security -fstack-clash-protection
 -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug
 -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
 -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental