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] scratch/new-flex-completion-style 2c75775 2/2: Score, sort and annotate flex-style completions according to match tightness Date: Wed, 6 Feb 2019 06:11:25 +0300 Message-ID: <556bfb2e-4720-c86a-c964-f057b50041b6@yandex.ru> References: <20190202232827.27331.87300@vcs0.savannah.gnu.org> <20190202232828.4AE452159A@vcs0.savannah.gnu.org> 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="143917"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 To: emacs-devel@gnu.org, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 06 04:20:15 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 1grDl0-000bKe-87 for ged-emacs-devel@m.gmane.org; Wed, 06 Feb 2019 04:20:14 +0100 Original-Received: from localhost ([127.0.0.1]:44239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grDky-0004aL-Td for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2019 22:20:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grDkg-0004V3-RN for emacs-devel@gnu.org; Tue, 05 Feb 2019 22:19:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grDcY-0007tU-1i for emacs-devel@gnu.org; Tue, 05 Feb 2019 22:11:30 -0500 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:35446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grDcX-0007t1-Ji for emacs-devel@gnu.org; Tue, 05 Feb 2019 22:11:29 -0500 Original-Received: by mail-lf1-x131.google.com with SMTP id l142so4320780lfe.2 for ; Tue, 05 Feb 2019 19:11:29 -0800 (PST) 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=fnorlN2THQmSBGH2pvOjf2dqMk+WBMdQCfhTQHPGaBk=; b=KREnL+hgaQQT7jKqkrzZvZMMg5RGaRIwxQxD2gbn/h4nITl+zSW1hZ49GN2TyvcIBR RE9kRAnB3vqs/vXd70KB/e48wcnuwuHAxPvD4xJzir0KtkKYlO/z575SVjGSCGVwVUC9 6L6vjlGILw48+MIwHc2G2rZh5Tf2OwfscMWqxtkut44PMVAUaUfgHJuY7nsX/vrgQ/lM BEEh3MyPQA9l+M4WTXKFfdbZULtFxEpKO+Lmmk/8hMDwjo44B5B8E5x762xMQ2UW4HV9 Zy2g1gp6eujHQcNdheosRgHGj+acovowEC50rXbdEZiE8PXtpnPgIXcRoNiwN1QGIFaZ 19gA== 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=fnorlN2THQmSBGH2pvOjf2dqMk+WBMdQCfhTQHPGaBk=; b=tuR+65Hkzz9t/kfbtWbb0Y0F706B2ggkGMA6SvDR2izn63moMBFqx09XsChvtLkVf3 3eWmyjev0BQTKnp67lJol2DoIgCibfBdz2GGunack/bU1qvF/YnaxcGWdowBfKjmdiwu Z5MY/3ukLb6f7VlZHr+PtnFDLrrHNKsrHRx8zxNzdjTJwoyqTElwdYE+A6RAWfRIwFgQ qpepY1vsfEaU+zScFAuSNypCVF7/TdjnaqqgMCvgjXYp60DMp27gWkx/3zkHo8fIONxy hmXe3ZK3WclHS7++TWhRZhtyWCTR+bblJq8a+qIdEdc/58uL8SmJHOIXWn99BWk0zi4Z G9Ag== X-Gm-Message-State: AHQUAuafM5G3ng7wLeK2xEbZyDGjvfTcYIATqpapd5MwNanZETUAVom8 Pvqka6ATOJfc7t1Ei1+Qers= X-Google-Smtp-Source: AHgI3IYngM8lv6OOTtGJZspZCea9k1OY5PnRu1wcIlrBKq+Tva1HyWxP4to/H2JIEw4IYhNLAIYjQQ== X-Received: by 2002:ac2:42c5:: with SMTP id n5mr4925962lfl.115.1549422688114; Tue, 05 Feb 2019 19:11:28 -0800 (PST) Original-Received: from [192.168.43.247] ([217.118.78.125]) by smtp.googlemail.com with ESMTPSA id a11sm4045389lff.68.2019.02.05.19.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 19:11:26 -0800 (PST) In-Reply-To: <20190202232828.4AE452159A@vcs0.savannah.gnu.org> 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::131 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:233024 Archived-At: On 03.02.2019 02:28, Jo�o T�vora wrote: > + ;; Sort again in case the completion style has propertized > + ;; completions with a 'completion-style-sort-order. > + (setq completions > + (sort completions > + (lambda (a b) > + (let ((va (get-text-property 0 'completion-style-sort-order a)) > + (vb (get-text-property 0 'completion-style-sort-order b))) Shouldn't we be concerned that this overrides display-sort-function returned by the completion table? Maybe some sort of customizable mechanism is in order, similar to completion-styles. Or more simply, we just leave it to the completion table's author to set display-sort-function to a special value that makes use of these properties. It's not like setting it to a different value is going to make sense in this case. > + ;; Annotate completions with <...> > + ;; the completion style annotation. Is this for debugging?