From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: VOTE: Changing completions-common-part face's default Date: Sat, 9 Nov 2019 01:38:49 +0200 Message-ID: References: <87pni7p83l.fsf@gmail.com> <87h83ipoi0.fsf@gmail.com> <93235eb5-8e04-7182-e2a4-49fbe610ee2b@yandex.ru> <28d4ae09-daca-324b-2fa6-9d7138d710fa@yandex.ru> <87zhh82d8c.fsf@gmail.com> <1e1aa5a7-a35b-2ef5-6caf-10e02dd0c6ea@yandex.ru> <3cfbe69a-c274-f4f2-f3f5-9eb4c8500bb8@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="41487"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: Stefan Monnier , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 09 00:39:52 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 1iTDr5-000AhX-I9 for ged-emacs-devel@m.gmane.org; Sat, 09 Nov 2019 00:39:51 +0100 Original-Received: from localhost ([::1]:33176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTDr4-0000lp-BC for ged-emacs-devel@m.gmane.org; Fri, 08 Nov 2019 18:39:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45941) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTDqB-0000lF-TF for emacs-devel@gnu.org; Fri, 08 Nov 2019 18:38:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTDqA-00050R-H9 for emacs-devel@gnu.org; Fri, 08 Nov 2019 18:38:55 -0500 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:42659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTDqA-0004zx-9O for emacs-devel@gnu.org; Fri, 08 Nov 2019 18:38:54 -0500 Original-Received: by mail-wr1-x42f.google.com with SMTP id a15so8817620wrf.9 for ; Fri, 08 Nov 2019 15:38:54 -0800 (PST) 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=xfvsOk7qdaJP6JTTRTVnPXGN3u9NVxTbd+Q7Ok/OPZk=; b=XIQ9xX78AW1bGRXFTwDiy+gy177cKbqt+awNXcM9+HZAfb9AOwSO7g+dUWHE1zJNOd ZXNr776W6dhqtDW58xV+VsV8ZiuUfvhAAtqmPjCw6k/9Dlx0WD3nCgBtRAjZgmOO7ABy B+RYJ1PWDiNa8R8+JoaqCbfSnZK01oWIz0vlE2aKvQebEBHWYqqV/24iVS1SUs4KWnQF xN3DN/TJVUCO+5lOUxWlrlwA/Phx+dWgzAErG6HepaZTAkK6CcPuzh2qe9iwT6QF/u6t UNXcPcebzs+bodqSUzQLCtBz2nJHytMpmsdZFp8f9IvYP8I+Y+LXpXIdM5KZllNYTAkE ND5A== 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=xfvsOk7qdaJP6JTTRTVnPXGN3u9NVxTbd+Q7Ok/OPZk=; b=DT0GAzq4ztT7I2I4F5SmtluaVrQS+sBs37wLZCDMpsrcc2GYAKBfhAkpye+ZDHoRZr ZuIlk6rOeXl7GoV7dxlsh7ww7eYPpCXIhD5InUBeE3mReQydRooAkZ9t0NjrHxg+U1M1 8GCD+HzQWIqRXfuIhDlok1A+ny6onr40MPsbl+Wum0b2xZGdTuZBOxOXtCpNQOYvY0Sk rEescwttm0W0HXS4wiZeJHUBvRN1gPZb9sTWD1GerOnpZMeRlk7ZRe18KvOimKsja44Y icD48LBr0a2vVyQdjsH+eJrgkvKZSOeQANbrGTvp1inuR8h3H54a4ERHPXzgDxlQAPie W7qg== X-Gm-Message-State: APjAAAXqR1+IL9XN8VF7t1FT5pMsdgfTol+7p71uUOhitt3PHvHua/j/ Wj0xlgu3M97CDsnq8GJH7Zrd7cDqxLo= X-Google-Smtp-Source: APXvYqwen/r4aRQDVdNmUx48Fyjvg4m5NVvnw3DxvTcfiy0OkGziA4UBGAsRElK+DZv5qshxdyE1zg== X-Received: by 2002:adf:a31a:: with SMTP id c26mr10245004wrb.330.1573256332869; Fri, 08 Nov 2019 15:38:52 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id t1sm9939361wrn.81.2019.11.08.15.38.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Nov 2019 15:38:51 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f 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:242019 Archived-At: On 07.11.2019 17:54, João Távora wrote: >> I don't understand this. flex is deterministic. Which part exactly >> cannot be trusted? > > Precisely, I thought you wouldn't. Flex is designed to let you > smash some keys that vaguely fit into your intended completion, > or at least enter the spectrum where you kinda remember the > completion to be. Some Flex implementations even allow you > to reverse keys so that when my lazy hand types "lyaz" it still > maches "the-lazy-fox". When scoring, flex makes some mistakes > (depending on how good/sophisticated the scoring algorithm is). > So it's important to understand why the suggestion is at that > place. Important for the completion style author mostly, though. It's not like a regular user could do something about it. Isn't that right? > You might think this double-checking "wastes your synapses". > It's a bargain indeed. it doesn't work for everyone. But it's > nonsensical to have flex with that crucial part crippled. > > So that in the case of "lzy", I can choose between "the-lazy-fox" > and "le-zorg-yorg". Both can be reasonable intentions at different > points in time. Okay, but... our particular flex implementation doesn't do the free-form matching like that. Do you intend to extend it in that direction? >> I'm not sure I can agree with that. Company highlights the common part, >> not simply whatever part completion style chooses to highlight. > > If it's somehow so important for company to highlight always the > common part, we can put a 'this-is-part-of-the-common-part' prop > there, too, for company's benetif. Sniffing for faces, the way I > implemented it, was really a low-hanging-hack anyway. The patch > to sniff for a property is trivial. > > So I wouldn't worry about that. Okay. That would still mean two different execution flows. > By the way, doesn't this requirement for company clash with your > view of the other Emacs frontends? Why is it important for company > to always highlight the common part, but not for Emacs's icomplete, > or *Completions*? Because its main frontend is a popup which looks and, to an extent, behaves like the completion popups in other editors. So it's really expected to behave more or less the same. company-tng also implements one of the simplified workflows from the other editors.