From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Why fido, icycles, ido, icomplete Date: Thu, 07 Nov 2019 02:07:09 +0100 Message-ID: <87bltoebpe.fsf@telefonica.net> References: <20191106212018.cnddqzlo5rpdhi6s.ref@Ergus> <20191106212018.cnddqzlo5rpdhi6s@Ergus> <877e4c1x3r.fsf@gmail.com> <87o8xoeik4.fsf@telefonica.net> <87k18ceh8w.fsf@telefonica.net> <87a7984j4p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152440"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 07 02:07:37 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSWGt-000dXb-VB for ged-emacs-devel@m.gmane.org; Thu, 07 Nov 2019 02:07:36 +0100 Original-Received: from localhost ([::1]:38220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSWGs-0002Sq-Si for ged-emacs-devel@m.gmane.org; Wed, 06 Nov 2019 20:07:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60361) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSWGi-0002Sb-IZ for emacs-devel@gnu.org; Wed, 06 Nov 2019 20:07:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSWGh-0002eO-D6 for emacs-devel@gnu.org; Wed, 06 Nov 2019 20:07:24 -0500 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:35336 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iSWGh-0002eB-6k for emacs-devel@gnu.org; Wed, 06 Nov 2019 20:07:23 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1iSWGb-000dEs-Q3 for emacs-devel@gnu.org; Thu, 07 Nov 2019 02:07:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:Rm0kGNCP2d9GoSH4quyse7uNBRk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241896 Archived-At: João Távora writes: > Óscar Fuentes writes: > >> João Távora writes: >> >>> It sounds like you're an ido-mode fan, so please try out >>> fido-mode and tell me what you think is missing from it. I >>> know a lot is, and I want to improve it. >> >> Has fido-mode support for flx-ido? Can I plug it in? Any other >> completion system that I know on Emacs is unbearably dumb IMAO. > > I don't know flx. According to its github page flx is a "matching > engine", what in Emacs is a "completion style", I believe. Right? A > way to match a pattern to a universe/set of possible strings and to > return a (possibly propertized/annotated) subset of those strings. It takes a set of candidates and a string as inputs. The algorithm associates a score to each candidate based on the string and outputs a list of matching candidates sorted by the score. > If so, and if flx adheres to the completion-styles API, then it's very > easy to plug in. If it doesn't, maybe the author can find a way to > adapt it, just like Thierry did recently in Helm. Where can I learn about that completion-styles API? > You can also try 'flex' and tell me what you think you are missing from > flx. I don't find flex "unbearably dumb" :-) I have experience with ido's flex and can't compare. flx requires some training but then it is extremely effective. I no longer bother to memorize most keyboard shorcuts, because by just remembering *some* part of the command's name it can be easily invoked through M-x, often with less keypresses (and with much less chording). It is quite effective at discovering new commands, once you have an idea of the naming convention that a package uses. Last, but not least, it is the matching system used by some of the "cool kids" that competes with Emacs (Sublime Text, to name one). > I like to type mispelled fragments of words I vaguely remember and it > almost always pops my intended thing to the top of the list. But it > doesn't autocorrect like google, for example, that's much harder. (does > flx?) If you need autocorrection with flx, you are using it wrong. For instance, with M-x and 20000+ candidates, four letters are almost always enough to put the target on the first 10 candidates. Said that, flx is somewhat forgiving about typos but explaining the reason without first explaining how the algorithm works is difficult. The weak point of flx is that it can be a bit slow. The author put a lot of effort on optimizations and it works reasonably well by using caching techniques, but the first invocation takes a bit too long even on fast machines and the cache uses lots of memory. Implementing the algorithm in C is on my to-do list. Then it could be used even for incremental search on a buffer.