GNU bug report logs - #5724
23.1.94; ido bug in next match

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 15 Mar 2010 16:49:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5724 in the body.
You can then email your comments to 5724 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5724; Package emacs. (Mon, 15 Mar 2010 16:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Mar 2010 16:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: storm <at> cua.dk, bug-gnu-emacs <at> gnu.org
Subject: 23.1.94; ido bug in next match
Date: Mon, 15 Mar 2010 16:48:18 +0000
[Message part 1 (text/plain, inline)]
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.

[long-list.el (application/emacs-lisp, attachment)]
[Message part 3 (text/plain, inline)]
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

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5724; Package emacs. (Fri, 26 Mar 2010 12:07:03 GMT) Full text and rfc822 format available.

Message #8 received at 5724 <at> debbugs.gnu.org (full text, mbox):

From: Christian Dietrich <stettberger <at> dokucode.de>
To: 5724 <5724 <at> debbugs.gnu.org>
Subject: Re: 23.1.94; ido bug in next match
Date: Fri, 26 Mar 2010 10:40:08 +0100
Hi,
i can reproduce your bug here with emacs 23.1, and i tried to track
down the problem. But as far as i can see the reordering of the
match results isn't done by ido-set-matches-1. The position of the
matches items in ido-cur-list and in the result of ido-set-matches-1
is the same. Think of 

(remove-if '(lambda (x) (not (member x after-match)) before-match)

So i assume that the Problem isn't at that place.

greetz didi

-- 
No documentation is better than bad documentation
-- Das Ausdrucken dieser Mail wird urheberrechtlich verfolgt.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5724; Package emacs. (Sat, 27 Mar 2010 10:44:01 GMT) Full text and rfc822 format available.

Message #11 received at 5724 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Christian Dietrich <stettberger <at> dokucode.de>
Cc: 5724 <5724 <at> debbugs.gnu.org>
Subject: Re: bug#5724: 23.1.94; ido bug in next match
Date: Sat, 27 Mar 2010 10:43:16 +0000
[Message part 1 (text/plain, inline)]
On 2010-03-26 09:40 +0000, Christian Dietrich wrote:
> Hi,
> i can reproduce your bug here with emacs 23.1, and i tried to track
> down the problem. But as far as i can see the reordering of the
> match results isn't done by ido-set-matches-1. The position of the
> matches items in ido-cur-list and in the result of ido-set-matches-1
> is the same. Think of 
>
> (remove-if '(lambda (x) (not (member x after-match)) before-match)
>
> So i assume that the Problem isn't at that place.
>
> greetz didi

I think I have located the problem.

ido-set-matches is called with different args when C-s so it returns
different matches. I couldn't understand why it is designed this way. I
am surprised no one has been annoyed by this bug. It has caused me to
choose the wrong match quite often. I have attempted a fix by simply
rotating the ido-matches when rotating.

[ido.diff (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Cheers,

Leo

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5724; Package emacs. (Thu, 03 Feb 2011 17:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 5724 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: 5724 <at> debbugs.gnu.org
Subject: Re: 23.1.94; ido bug in next match
Date: Fri, 04 Feb 2011 01:16:29 +0800
This bug seems to be fixed in:

http://repo.or.cz/w/emacs.git/commitdiff/7c481af3e2b7dc3a530c7e0d9c61b0721aadbd1d

"(ido-next-match, ido-prev-match): Fix stray reordering of matching
 items when cycling through the matches."

Leo


-- 
Oracle is the new evil




bug closed, send any further explanations to Leo <sdl.web <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sat, 12 Feb 2011 01:25:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 Mar 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.