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: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness Date: Sun, 17 Mar 2019 20:06:22 +0200 Message-ID: References: <20190213212413.868.40960@vcs0.savannah.gnu.org> <20190213212415.148B9209D7@vcs0.savannah.gnu.org> <0ba3ca47-c7d6-a608-536e-94784ba3384b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113416"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 17 19:07:20 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5aBq-000TNA-T1 for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 19:07:19 +0100 Original-Received: from localhost ([127.0.0.1]:58503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5aBp-0003hw-Sy for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 14:07:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5aB3-0003g1-DW for emacs-devel@gnu.org; Sun, 17 Mar 2019 14:06:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5aB2-0006FB-Jj for emacs-devel@gnu.org; Sun, 17 Mar 2019 14:06:29 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:41402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5aB2-0006EF-2V for emacs-devel@gnu.org; Sun, 17 Mar 2019 14:06:28 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id z25so12017401ljk.8 for ; Sun, 17 Mar 2019 11:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PpqBveAEXWiVcBDixE4v9NOsYb3qEj84J1xjc7nApIQ=; b=f/7cROxyya7Lqn8Yd9Thv4ITCESpNFeRPos+WDo11nIVhNK/d6ZQcLjUa2z/rWgxd+ xdzAIg3yKo+tkFR1KdBcaQZhHhYEuFjuA2TQF2uXgw1Z0Uc8YFu4Hq7EkP0pEILRuLA+ MBrBiJDzT2Xl07FV4k8oblMxjBWYpG3Kjed4LE0HmqBe+j9XIzjvCmXu5oZ7mL6gJDYQ Boox4GSGA7UuQBpg95hfHXuwGVm4AyicO57ovC3oI7U+3pM1Ea/o3PG5XufZFZcrD+av vHzgujxSItWb5qsFHEpCbt1G3bFdzDfUaw0XG5zqPyzPwZxwqYz9j+EwR31M3WzaLCfC XlWQ== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PpqBveAEXWiVcBDixE4v9NOsYb3qEj84J1xjc7nApIQ=; b=IWpUZeuvaY7JjEFCpHe1DWDhPtsZ6RmTrgk/yiVCSIUWp17ISpUzchPd1I1hklIL08 YSEgtsGHC85ufZUfrJKSEvLUIu2suKSxlYERFPis3vIbPfrq6bnWEbW1Ai4XNza+uT9T WDrimGwNRBevaAEXRJn5m4DIT/ncjB+HfxPBOn2cEA0X6XwRSofnBsqRz6OODwDsMLvc eAw+2A35PyWg9QXJk0/r0fg5iC189R1Jkgkjg2xg9gvPry16WEEtRMCa6XXJAkRnAgRz J7HUL3pc+Jgny2aad6nmSoBSr4bGPXCNQgSsxVBHiXPxq5sjrmAYYMBjoTXLsFlfoU4A 8d2g== X-Gm-Message-State: APjAAAW+dYPRamrRO47vZk2PJIbb4UKr2S/1HBMXsbEuuHbzglRQLvWf 9jpgsdG7jnr4sibDbAkDHzq2xvMd X-Google-Smtp-Source: APXvYqw1UNlAPv3VO1SSddx/2uGDi/hq0BnkGonz01gfx0kdoHckOLu64g2zK9LeTJL/pI1sIIFE5w== X-Received: by 2002:a2e:880a:: with SMTP id x10mr8251446ljh.12.1552845985893; Sun, 17 Mar 2019 11:06:25 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id 25sm1724051lja.60.2019.03.17.11.06.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Mar 2019 11:06:25 -0700 (PDT) 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::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:234288 Archived-At: On 16.03.2019 15:19, Stefan Monnier wrote: >> It adds them in the hope that they would be useful in the near future. >> When I added this bit, I thought it would be a matter of days until we >> found a suitable place for a sorting function to use those properties. >> But it's been two months and a decision hasn't yet been reached. > > Actually, I think we did reach a consensus, but I haven't gotten to > writing the code yet. Agreed. >> Regardless of the decision of where to put sorting function based >> on flex scores, completion-pcm--... is a most suitable place to add the >> scoring, since this is where the string is propertized (and the scoring >> is closely related to that. > > Also, I think the scoring would be valuable for `partial-completion` and > `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. 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.