From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: BIKESHED: completion faces Date: Tue, 05 Nov 2019 21:23:27 +0200 Message-ID: <83ftj2gma8.fsf@gnu.org> References: <4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru> <87pni7p83l.fsf@gmail.com> <83h83ignrz.fsf@gnu.org> 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="201495"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 20:24:04 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 1iS4Qu-000qJR-7o for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 20:24:04 +0100 Original-Received: from localhost ([::1]:48876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS4Qs-0002C6-Pc for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 14:24:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43177) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS4QT-00028s-0C for emacs-devel@gnu.org; Tue, 05 Nov 2019 14:23:38 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iS4QQ-0004WA-Ow; Tue, 05 Nov 2019 14:23:35 -0500 Original-Received: from [176.228.60.248] (port=3500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iS4QQ-0003eT-0F; Tue, 05 Nov 2019 14:23:34 -0500 In-reply-to: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Tue, 5 Nov 2019 19:16:00 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:241816 Archived-At: > From: João Távora > Date: Tue, 5 Nov 2019 19:16:00 +0000 > Cc: Stefan Monnier , Dmitry Gutov , > emacs-devel > > > The purpose of completion-first-difference is to help the user decide > > what to type next. > > Indeed it does that. But there are equally efficient other ways to do the > same, in my opinion. If we have one efficient way, why do we need to consider others? > One of them is to highlight the preceding character. ??? How does this help me to select what to type next? > > What is the purpose of highlighting other parts of > > the candidates? > > For a matching style such as flex or substring (as you would find in > many other editors) it's important to visually explain users to users > why certain strings that don't start with the pattern they entered > are being shown on the screen. I attach an image. I don't see why it's important to explain how did the completion algorithm arrive at a particular candidate. The completion algorithm is there to intuit what we mean in the most efficient way, but the details of how it does that are immaterial. The only ones who may be interested are those who study completion algorithms ;-) > completion-first-difference is at the very least a misnomer for > other types of completion, because with flex there can be infinitely > many "first" differences. No, "first difference" is always the character to be typed after point. At least for the vastly important case that point is at the end of what you typed, i.e. you don't move point back after typing something.