From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: handling many matches Date: Sat, 02 May 2020 16:52:21 +0300 Message-ID: <83wo5usaui.fsf@gnu.org> References: <119c0543-387d-4fad-b7fe-b4e07a7be4f8@default> <837dxuvohj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="8405"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jonas@bernoul.li, emacs-devel@gnu.org, monnier@iro.umontreal.ca, adam@alphapapa.net, kyle@kyleam.com, drew.adams@oracle.com To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 15:53:15 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 1jUsZt-00022s-LE for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 15:53:13 +0200 Original-Received: from localhost ([::1]:56596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUsZs-0001rp-Mn for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 09:53:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUsZF-00012F-B0 for emacs-devel@gnu.org; Sat, 02 May 2020 09:52:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57745) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUsZD-00027E-Qv; Sat, 02 May 2020 09:52:31 -0400 Original-Received: from [176.228.60.248] (port=2705 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUsZD-0000jg-EF; Sat, 02 May 2020 09:52:31 -0400 In-Reply-To: (message from Dmitry Gutov on Sat, 2 May 2020 16:26:54 +0300) 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:248440 Archived-At: > Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li, > emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net, > kyle@kyleam.com > From: Dmitry Gutov > Date: Sat, 2 May 2020 16:26:54 +0300 > > On 02.05.2020 09:29, Eli Zaretskii wrote: > > IMNSHO, we should first develop the infrastructure for such "smart" > > presentation of completion candidates and make it our default > > completion strategy, > > How would that look, in your opinion? If by "look" you mean to the user, then I envision a list of completion candidates that somehow "knows" what I'm after, and places those likely guesses near the beginning of the list. > > and only after that consider changes, like the > > proposed "namespacing" of APIs, that will allow users to use > > completion as a substitute for Help commands. > > Namespacing of APIs is a step that should help the users with the > current default completion strategy. 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. > > It is IMO a bad idea to > > flood the completion lists with many dozens of candidates and force > > users to wade through them. I certainly wouldn't call that "progress" > > for Emacs. > > Is that what fido-mode does? People seem to like it. I don't have a good idea of what fido-mode does, but the rather foggy idea I do have says it just applies fuzzy search criteria, attempting to find non-literal matches. If this is so, then I don't think fido cuts it. 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. Compare with the Internet search: it almost always brings me hundreds of hits, but I normally find what I was after among the first dozen. Even more spectacularly, when I type a search phrase into the search box, it guesses what my search phrase will be, and the guesses are almost always very accurate, so much so that if I don't see a long enough list of reasonable candidates, I usually go looking for some typo in what I typed (and almost always find it). Some of the candidates are based on my previous search phrases, and the ones I typed are always ready to be reused, with a special indication to let me know I recently used them. It is this kind of powerful scoring that I think we need to develop if we are going to handle many dozens of completion candidates. Because who has patience and time to wade through 100 candidates, let alone 1000?