|
From: | Dmitry Gutov |
Subject: | Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness |
Date: | Sat, 16 Mar 2019 03:13:43 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Hi Joao,Now that I've been seeing company-capf test failures mentioning completion-score for a while (e.g. see https://travis-ci.org/company-mode/company-mode/jobs/507061364), I really have to ask:
Why does a completion-pcm--??? function add the scores? And even does that unconditionally, and depends on the value of a flex-related variable. While the flex style isn't even used.
On 13.02.2019 23:24, Jo�o T�vora wrote:
branch: master commit b0e318d27f10b820f1cfad6ea98793c11fc782a4 Author: João Távora <address@hidden> Commit: João Távora <address@hidden> Score flex-style completions according to match tightnessThe new completion style needs to score completion matches so that wecan use it later on when sorting the completions. This is because "foo" can flex-match "foobar", "frodo" and "barfromsober" but we probably want "foobar" to appear at the top of the completion list.This change introduces a scoring formula and adds scoring hints in thecandidate string's `completion-score' property.* lisp/minibuffer.el (completion-pcm--hilit-commonality): Propertizecompletion with 'completion-score (flex-score-falloff): New variable.
[Prev in Thread] | Current Thread | [Next in Thread] |