From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions
	according to match tightness
Date: Sun, 17 Mar 2019 19:22:12 +0000
Message-ID: <CALDnm52k-NMs8jfUHj2UoT=AFj3byQZZ8HU-axOqz0n0bRf1Gw@mail.gmail.com>
References: <20190213212413.868.40960@vcs0.savannah.gnu.org>
	<20190213212415.148B9209D7@vcs0.savannah.gnu.org>
	<0ba3ca47-c7d6-a608-536e-94784ba3384b@yandex.ru>
	<CALDnm53-7bkf0+c_pf1JNzkiRpfyuowONXXChTEfuzW_Ln7aXA@mail.gmail.com>
	<jwvva0j6jsb.fsf-monnier+emacs@gnu.org>
	<aeafbcc5-0466-af36-e646-22aa0ef1544c@yandex.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="169901"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel <emacs-devel@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 17 20:27:30 2019
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
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.0:RSA_AES_256_CBC_SHA1:256)
	(Exim 4.89)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1h5bRM-000htG-2r
	for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 20:27:24 +0100
Original-Received: from localhost ([127.0.0.1]:59301 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1h5bRL-0003GK-21
	for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 15:27:23 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:33192)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <joaotavora@gmail.com>) id 1h5bQL-0003EK-NI
	for emacs-devel@gnu.org; Sun, 17 Mar 2019 15:26:22 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <joaotavora@gmail.com>) id 1h5bMY-0008BK-Mh
	for emacs-devel@gnu.org; Sun, 17 Mar 2019 15:22:27 -0400
Original-Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]:41594)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <joaotavora@gmail.com>)
	id 1h5bMY-0008B5-8h
	for emacs-devel@gnu.org; Sun, 17 Mar 2019 15:22:26 -0400
Original-Received: by mail-qk1-x734.google.com with SMTP id o129so8445194qke.8
	for <emacs-devel@gnu.org>; Sun, 17 Mar 2019 12:22:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to
	:cc:content-transfer-encoding;
	bh=7t6MdJfW5NEkmHWHMPOiauuIRWKAwmWHFCJsw9/9xSU=;
	b=e4VvN/PQMjoYPhyOZJ2UgP+i5smYWsR7iM7yGkOKIOT0O6zWkvX5grr1IUWP9XwQrd
	Xe2JuZgfyB+2AmJK/Ybjf8CLfKsRqtfKmK4C7HjMJkcCUFuKFjmRAAQ22oCQMIpRdbH8
	/CPUq3JGqsAkyI+LpS4YwmdBOji33QDtPXaIX2SSAJtBN9rlMgRXcfnMEYSJRGbS4PaV
	jBFXUEG4TZvsASwpY1lbsxwJJc3gC4uUUkXeoW8ELoFg4sBJiaSDv0we++MAm46tudKr
	pCnXO6m0Stk6p5W+xLAuS9ZHIpzcf4P9sPzGvLiUCt9MLuK3XJ8ozjzHAsU9ld4Tlgb8
	zq3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to:cc:content-transfer-encoding;
	bh=7t6MdJfW5NEkmHWHMPOiauuIRWKAwmWHFCJsw9/9xSU=;
	b=BxOjocxVcCmY8luiSF0EAdKpf3DCO9yvLABSCDKVKuSIU9MfGoI5N2zPSkb+P2CaDV
	Z6DVqMAw/tPbp3Fbu7QXYY8T5fxaxCAlzN7i3qVrCCeeuUkRTzTItzZdsuvxZTKdaX1T
	dSICeCswBgP/j3v2eUoDywiGO8vGfxysVOCHUBz2Yu8DBaC/VzPLFJtu5PP8PYW37QjD
	N7Va/0gq5lfXkaWel4rbmjUVgty5wLtdOq4cG+w6ZvoMMk5paCS/1rAtes51S66z0m4q
	BIC4YZ0xBOct0ScFEDtKKLsgvTA+lWm2KfmLLnP0NjM92goG28KZju2ajQb6nr1MjZXC
	p90g==
X-Gm-Message-State: APjAAAWc9s+h3kFlS7A4cRyQuVxMkyGzinyK9P/bRi+9PU1Qtd0lNIXU
	umlYu9iGLtCcgCj3CIqt6QL4GujZGZ3yS0QYUY7IYQ==
X-Google-Smtp-Source: APXvYqxlL0rr9htytcz8kTVlwIXXlHXy71h0CfYkgrr80y6C/jCB9X8MVEV8IwkK7TMPko5V0+k7rv9ab+Lfcd+4A2c=
X-Received: by 2002:a37:8586:: with SMTP id
	h128mr10680032qkd.322.1552850545632; 
	Sun, 17 Mar 2019 12:22:25 -0700 (PDT)
In-Reply-To: <aeafbcc5-0466-af36-e646-22aa0ef1544c@yandex.ru>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4864:20::734
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:234294
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/234294>

On Sun, Mar 17, 2019 at 6:07 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
> > Also, I think the scoring would be valuable for `partial-completion` an=
d
> > `initialism` styles as well (i.e. for all users of PCM).
> Shouldn't flex-score-match-tightness be renamed, then? So it doesn't
> leave an impression of being specific to just one completion style.
>
> The first line of its docstring also seems misleading.

Re the docstring, you must be refering to the "flex" mention there,
because "Controls how the style scores its matches" is pretty much
what the variable does (and all that can be crammed in columns).

As I said, when I added this, it was largely open to debate where
scoring would be plugged in.  At that point I thought the style,
particularly the flex style, would be the right spot, but the debate
evolved.  Regardless of making this more general, the flex style
still is the spot where such scoring is needed most urgently, and
I think we should keep it there for a while.

> Further, purely theoretically, I'm a bit concerned that if we include
> scoring at this level, in the common function, it would be harder to
> tweak for each individual completion style. But that can be changed
> later if we so choose, of course.

A handful of us should eventually start using it first before engaging
in such microtweaks.  I'm more wary of the performance hit that
flex-matching introduces (the matching, not the scoring).  I wonder
if ditching pcm's regexp based approach and coding something by
hand (perhaps in C) would be faster.  I haven't done any
measurements but the thing feels slow to me: so I wish more
people could experiment with it (and with company, too)

Jo=C3=A3o