From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: fix for bug 10994 breaks ido customizations in major way Date: Tue, 7 May 2013 07:44:54 -0700 Message-ID: <432AFE3B3321498E9B17075D3B55A60B@us.oracle.com> References: <87txmfyb9n.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367937919 16974 80.91.229.3 (7 May 2013 14:45:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 May 2013 14:45:19 +0000 (UTC) Cc: 'Leo Liu' , emacs-devel@gnu.org To: "'Le Wang'" , "'Vitalie Spinu'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 07 16:45:17 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 1UZj8m-00087L-Ga for ged-emacs-devel@m.gmane.org; Tue, 07 May 2013 16:45:16 +0200 Original-Received: from localhost ([::1]:40405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZj8m-0003vH-6J for ged-emacs-devel@m.gmane.org; Tue, 07 May 2013 10:45:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZj8f-0003qg-2z for emacs-devel@gnu.org; Tue, 07 May 2013 10:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZj8a-0008LU-7J for emacs-devel@gnu.org; Tue, 07 May 2013 10:45:09 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:36821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZj8a-0008Jc-06 for emacs-devel@gnu.org; Tue, 07 May 2013 10:45:04 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r47Ej0Z7005573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 May 2013 14:45:01 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r47Eix7T009009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 7 May 2013 14:45:00 GMT Original-Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r47EixcW021907; Tue, 7 May 2013 14:44:59 GMT Original-Received: from dradamslap1 (/10.159.172.69) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 May 2013 07:44:59 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac5LBjflxa/SexOWSy+ZsXwj8i3YAQAKO6UQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:159392 Archived-At: > > (let ((t1 (propertize "aaa" 'aaa 12)) > > (t2 (propertize "aaa" 'aaa 11))) > > (ido-completing-read "?: " (list t1 t2 "sfd"))) > > > > works as expected. And the above patch breaks that. > > That would be a horrible UI. Luckily AFAICT, it hasn't happened. > That's why I say there is no actual valid use-case for repeating the > same string in completions. I don't care much about Ido, so I don't have an opinion about the question at hand. However, I will say that it is NOT at all the case that there is nothing out there, in the wild, that takes advantage of completion candidates that have the same text (same string chars) but that have other differences, whether the latter be text properties, symbol plists, associated files/buffers, associated buffer positions or urls or other locations - or whatever. Icicles is an example. There are _loads_ of commands in Icicles that take advantage of this. And there are many different ways that the differences, beyond the candidate text, can be communicated to users. And there are different ways that users can choose among such otherwise identical candidates. The possibilities are too numerous to mention here. Suffice it to say that, yes, there are Emacs applications that take advantage of candidate strings (and symbols) that have text (and symbol) properties. And yes, there are also applications that take advantage of the fact that a completion candidate can be a structure (typically an alist element that is a cons), of which the displayed string is only one component. Matching can involve any number of such components, as can the value returned as the user's completion choice. FWIW, wrt removing duplicates (and duplication can be defined various ways in different contexts, as just mentioned), Icicles lets you hit a key (`C-$') during completion to toggle whether to remove duplicates (or to otherwise transform the set of matching candidates, depending on the command and user settings). HTH.