Subject: 26.0.50; RET misbehaving in ido-find-file

From: John Mastro <[email-masked]>
Date: Tue, 15 Aug 2017 11:48:31 -0700

RET (`ido-exit-minibuffer') seems to be misbehaving in `ido-find-file'
in master.

To reproduce:
  1. mkdir test; cd test
  2. mkdir -p {aaa,aab}/foo
  3. emacs -Q
  4. Type "M-x ido-mode RET"
  5. Type "C-x C-f" (or "M-x ido-find-file RET")
  6. Type "a"
  7. Type "RET" (i.e. `ido-exit-minibuffer')

The result in Emacs 25 is that `ido-find-file' descends into the
directory selected after typing "a" (whether "aaa" or "aab"). You're
still in `ido-find-file' (with "foo" the only remaining option). This is
the expected behavior.

The result in Emacs 26 is that the directory selected after typing "a"
is opened in Dired.

I'm pretty sure this is a fairly recent change. I originally suspected
4246ad2 (enabling lexical binding in ido.el), particularly since ido.el
treats some variables as dynamic but never declares them as such (e.g.
`ido-cur-item', which is referenced in `ido-exit-minibuffer'). However,
I deleted the lexical-binding cookie, re-ran "make", and did not observe
any change in this behavior. I haven't had a chance to run a bisect.

Thanks

John

In GNU Emacs 26.0.50 (build 4, x86_64-w64-mingw32)
 of 2017-08-15 built on LAMBDA
Repository revision: 5c3d0ce3e09bf070bb3c89caa9d88f25d4a39283
Windowing system distributor 'Microsoft Corp.', version 10.0.15063
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --prefix=/c/emacs/emacs-master --with-zlib --with-gnutls
 --with-xml2 --without-imagemagick --without-pop
 --without-compress-install PKG_CONFIG_PATH=/mingw64/lib/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 97233 8485)
 (symbols 56 20083 1)
 (miscs 48 42 85)
 (strings 32 29965 1128)
 (string-bytes 1 770055)
 (vectors 16 14577)
 (vector-slots 8 485608 8006)
 (floats 8 50 66)
 (intervals 56 237 25)
 (buffers 992 11))