From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: handling many matches Date: Sat, 2 May 2020 19:58:08 +0300 Message-ID: <5f531674-88b2-55fd-a677-7cbd57a62b91@yandex.ru> References: <119c0543-387d-4fad-b7fe-b4e07a7be4f8@default> <837dxuvohj.fsf@gnu.org> <83wo5usaui.fsf@gnu.org> <14f6ff0f-afcc-5cc2-b8ce-491209c1e739@yandex.ru> <83y2qaqoxi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="1879"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: jonas@bernoul.li, emacs-devel@gnu.org, monnier@iro.umontreal.ca, adam@alphapapa.net, kyle@kyleam.com, drew.adams@oracle.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 18:58:47 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUvTT-0000Nh-Pk for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 18:58:47 +0200 Original-Received: from localhost ([::1]:41902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUvTS-0006Ph-Ps for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 12:58:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUvSw-0005Ft-3a for emacs-devel@gnu.org; Sat, 02 May 2020 12:58:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUvSv-0005dv-16 for emacs-devel@gnu.org; Sat, 02 May 2020 12:58:13 -0400 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUvSu-0005Zn-Hh; Sat, 02 May 2020 12:58:12 -0400 Original-Received: by mail-wr1-x42d.google.com with SMTP id i10so15611157wrv.10; Sat, 02 May 2020 09:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gxNb3OJDq2dv+xfZg8Y0vga3ukshDmuP3n7wO8NdeKs=; b=IAbk/jP1xhS3cqtZSEUjeS0rC3tRttNZ7SF86EUWlmZi6cgMZ/wiv8TkwKzmH7HU7H xi9ybTZAhyprKQ1LEWhXvXgH/XBlWztMxRPb4SOKsBO9hLQYLGibXQnADfBDv6kGfG1v hHWh10zYer9X3pcB4fwFdoapQtPSDZDHh+8rE7ITmeebFa8ut/aMKItT2VEHcsO95ak5 /h8Hj1JEO4we65k7cCRPbECfpYdDDcfH05RTzvtkFIngz2CoGax1PunFepooT6JteVXZ VN4zvFetZwhaoJotc0djdatFD+OfUGrbjsnKvIjLSHnw7dYx0W+VNWm1bT3kml2eARQE Wzqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gxNb3OJDq2dv+xfZg8Y0vga3ukshDmuP3n7wO8NdeKs=; b=bpgFkNuhmFb3ZCle4v73311x4+dwBlBSD6uezBW+dwe9U1TpNUSqZXJQBkIi0PAeAg ZmINOI81+hHljON7xPKAenFtf70r8zZ7shwHQBOShAxm8EWVKjWtnVxuc9/phh6CLn/o JDbK6hkMjd5631836E20N/vZGcdm4RWUPKRUkfuLhl94Q6Sv/sGT4mx2EL6DyveX5RhE iaxdB7fhhUAR+x3OHqc2bQr46pabotha0t5EiMuyRtLJt2WuUe9RIugRYopS2gSjZ0ju NseLfU3jywqFIJSuMtctLYZD7LUjHydqRR6kF/OXWJ360uXXlvydt9tDoy9Vku5Qe0cd NF4A== X-Gm-Message-State: AGi0PuZ/FFVHdokhqJHFV7CBbSIxNcL3KNYdOjqsUwtZX/fxDXbTIo/G nogATSgP1AUQ6WY6fxb8I6c= X-Google-Smtp-Source: APiQypKfa7284Cn2sBeA1E0LDottzjCgk+fXOu9msiyfrNWPrS2IyQNN5NWP+G2WrQOGUnWDvmefAg== X-Received: by 2002:adf:e487:: with SMTP id i7mr9785379wrm.393.1588438690712; Sat, 02 May 2020 09:58:10 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id o129sm5425063wme.16.2020.05.02.09.58.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 May 2020 09:58:10 -0700 (PDT) In-Reply-To: <83y2qaqoxi.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::42d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248500 Archived-At: On 02.05.2020 19:31, Eli Zaretskii wrote: >> All fuzzy completion systems do that. Generally by scoring how well each >> string resembles the input string. > > That criterion alone is not enough, IME. It is also important > (sometimes much more important) what I'm doing, in what major mode, > my previous completion attempts, etc. Your argument here has merit. The difficulty is in writing an appropriate scoring algorithm. The "what I'm doing" and "what major mode" conditions could be solved by pre-filtering in a lot of cases, though. >>> Like I said, I think the hopes it will deliver a significant enough >>> improvement are overrated. It will certainly bloat the lists of >>> candidates by factors, which is why I think it isn't a very good idea >>> as long as we don't have some smart scoring of candidates. >> >> The amount of "bloat" will be strictly limited by the number of aliases >> we add. > > Yes, and I tend to think we will add a lot. That's a self-defeating argument. By the amount of resistance from your side, my impression so far is that we'll end up adding none (again). >>> We need scoring that "learns" from what I do/did recently, >>> and from my habits. Otherwise the list of candidates will remain >>> hopelessly long, with no promise of having what I'm really looking for >>> anywhere near the beginning. >> >> There are systems like that, including in third-party Emacs packages. >> Personally, I'm not fond of the idea (the unpredictability, first of >> all), and I'd rather we polish the current scoring algo first. > > When the first few candidates are what I want, predictability goes out > the window. I'm a happy user when I find what I'm looking for fast. That rules out the "browsing an API" use case, when we need the "first 20" or "first 40" candidates to be good. IOW, the algorithms should be everything to everyone. Which is difficult, but we should try to approach it.