Subject: bug#5724: 23.1.94; ido bug in next match

From: Leo <[email-masked]>
Date: Mon, 15 Mar 2010 16:48:18 +0000

In ido mode, C-s rotate the matches. The following steps exhibits a
delicate bug which seemingly causes the matches to re-order.

1. Emacs -q -l long-list.el (attached)
   take a look at the first 4 matches in the minibuffer
2. C-s

Normally you expect C-s to get you one step closer to the fourth item
but it just pushes it one step further in this case.

This is also reproducible with the ido.el included in Emacs 22.

It may have something to do with prefix-matches, matches, suffix-mathes
in ido-set-matches-1.

BTW, in my local copy of ido.el I have integrated recentf into it so ido
automatically pulls in visited files when switching buffers and the user
input does not match any. I have a long recentf-list.

In GNU Emacs 23.1.94.1 (x86_64-apple-darwin10.2.0, Carbon Version 1.6.0 AppKit 1038.25)
 of 2010-03-14 on Victoria.local
Windowing system distributor `Apple Inc.', version 10.6.2
configured using `configure  '--prefix=/usr/local/unix/emacs' '--with-mac' 'CFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t