From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: fix for bug 10994 breaks ido customizations in major way Date: Sun, 05 May 2013 12:57:36 +0200 Message-ID: <87vc6xsnhb.fsf@wanadoo.es> References: <87ip2zm89w.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367751469 412 80.91.229.3 (5 May 2013 10:57:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 May 2013 10:57:49 +0000 (UTC) Cc: Leo Liu , emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 05 12:57:47 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UYwdX-0003pG-9J for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 12:57:47 +0200 Original-Received: from localhost ([::1]:40764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYwdW-0001Kp-SP for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 06:57:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYwdT-0001Kk-8P for emacs-devel@gnu.org; Sun, 05 May 2013 06:57:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYwdS-0004JX-AG for emacs-devel@gnu.org; Sun, 05 May 2013 06:57:43 -0400 Original-Received: from impaqm4.telefonica.net ([213.4.138.20]:8304 helo=telefonica.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYwdR-0004Df-W3 for emacs-devel@gnu.org; Sun, 05 May 2013 06:57:42 -0400 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm4.telefonica.net with bizsmtp id YAny1l00A2jdgqJ3QAxe5U; Sun, 05 May 2013 12:57:38 +0200 Original-Received: from qcore ([83.40.116.149]) by IMPmailhost5.adm.correo with BIZ IMP id YAxc1l00C3DUQuj1lAxcjb; Sun, 05 May 2013 12:57:37 +0200 X-CMAE-Analysis: v=1.1 cv=bANl1MxOKKE0XAgTJ5KDo1Nh9SH0otGhU58K7+V3S60= c=1 sm=1 a=DQlLCnKHR5QA:10 a=jB3pZ5H4rBYA:10 a=sSE9TqpJnXXWdi4WNHITQg==:17 a=pGLkceISAAAA:8 a=mDV3o1hIAAAA:8 a=Da_R9tnnkLwkGd6CxBYA:9 a=MSl-tDqOz04A:10 a=sSE9TqpJnXXWdi4WNHITQg==:117 X-original-sender: 981711563@telefonica.net In-Reply-To: (Le Wang's message of "Sat, 4 May 2013 21:00:15 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.4.138.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159329 Archived-At: Le Wang writes: > The only way to introduce list with dupes is ido-completing-read (i.e. it's > not an issue for files and buffers), so I think it's okay to remove dupes > just once on entry. > > Patch atached. diff --git a/lisp/ido.el b/lisp/ido.el index bedf00e..15e280e 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3159,8 +3159,7 @@ Use `eq' for comparison." (sofar nil)) (while (not ret) (setq next (car items)) - ;; Use `eq' to avoid bug http://debbugs.gnu.org/10994 - (if (eq next elem) + (if (equal next elem) (setq ret (append items (nreverse sofar))) ;; else (progn @@ -4795,7 +4794,7 @@ DEF, if non-nil, is the default value." (ido-directory-nonreadable nil) (ido-directory-too-big nil) (ido-context-switch-command 'ignore) - (ido-choice-list choices)) + (ido-choice-list (delete-dups choices))) ;; Initialize ido before invoking ido-read-internal (ido-common-initialization) (ido-read-internal 'list prompt hist def require-match initial-input))) Tried it and seems to work fine for both flx and the original ido bug report about C-s/C-r with duplicates. Leo, what do you think?