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==?= Newsgroups: gmane.emacs.devel Subject: Re: new-flex-completion-style Date: Mon, 11 Feb 2019 23:11:27 +0000 Message-ID: References: <20190202232827.27331.87300@vcs0.savannah.gnu.org> <20190202232828.4AE452159A@vcs0.savannah.gnu.org> <87lg2mynrg.fsf@gmail.com> <194f7c2e-cb9c-87ae-8282-a314697a5800@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="264476"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 12 00:12:08 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 1gtKkC-0016im-L1 for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2019 00:12:08 +0100 Original-Received: from localhost ([127.0.0.1]:57732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtKkB-0005yn-Ky for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2019 18:12:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtKk5-0005yg-3O for emacs-devel@gnu.org; Mon, 11 Feb 2019 18:12:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtKk1-0005Bx-7X for emacs-devel@gnu.org; Mon, 11 Feb 2019 18:11:59 -0500 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:46975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtKjr-0004zs-CE for emacs-devel@gnu.org; Mon, 11 Feb 2019 18:11:51 -0500 Original-Received: by mail-qt1-x82e.google.com with SMTP id y20so756008qtm.13 for ; Mon, 11 Feb 2019 15:11:39 -0800 (PST) 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=1GD13jMZEhSlCO3LAQCDz89WiLa3ZDkslxKTDz8H1dk=; b=RRvMf7KyTazgvNLvEXkCb7i7xylyBY5RSqMZYKHhIwxk1Ym4LV0vvz4SDgbwq4gxsh x+53ACZqQaCf2uJ1AKAwaa5nYrQWXeFU2UlBt4SE4cgJT29rG9PxS8qjCBEC2k3PeMxU JQowuVb7h8inG24Vf01m00fW36vg2ZH9nhcg/WcaWL9tXiOu/vJnM17K5eEZfUWX3Pz3 Ha7sXViaaghDNrCafXfkRQT7htLOG+3kmOdtLtQRU6CIbXbg9JFA6DbznJwqvauhPASh hZv9tvGPYfzR6JRku1kneI2i6kEhlRL5d9Rjq9MWbB4yCxR6Ez3lx0kGGZw923hded4i Piww== 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=1GD13jMZEhSlCO3LAQCDz89WiLa3ZDkslxKTDz8H1dk=; b=fDZ/fxpqp0LFHjuQGztuPCCrgd2e1m0DEPMvoeN/t9ntC3dvoPqlVQGYXKzv3CN8Me PhzWhN6BaXbzuyFx/8flU47lm/B8c9QUbo7jv3kfF5rwFMI/gGBZ7ThkJF3b9Y11aXp2 yW+ULBhb2hM7uKAgv5tX1jZiPwkblxy4Lr0GSimshQ6fGa0R8/IK3TbwZ14MXdh5yZwe sVH95DieIfd25CCMi+TPzpnfzvaAKJZM23VY033O2kb/bTgrfzAyKSxHZug9ZqxV/r1T UD7hajloItb1WiW/hNIUGYEkb71b7KjtMSBy7LrJCTm4eeGUaszWTOuciur89EbXwUk5 xu1w== X-Gm-Message-State: AHQUAub2PE3u2KyVEXDzSq/IUbZPu58lhJGKWUKvAOzAGbT+HHqtEG3U GKYwEM7dC/xO2pOceZUwvhM+MWg8MryNqsxhkIA= X-Google-Smtp-Source: AHgI3IartcC3y2cFy+3FamA4fZhSGFB5B4RPDf0IvpZkEBA/DROHvUwJryBAXCnw60wfMCduMUa5mUi4KfFO6l0l5js= X-Received: by 2002:aed:2a6d:: with SMTP id k42mr536101qtf.390.1549926698553; Mon, 11 Feb 2019 15:11:38 -0800 (PST) In-Reply-To: <194f7c2e-cb9c-87ae-8282-a314697a5800@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82e 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:233239 Archived-At: On Mon, Feb 11, 2019 at 11:02 PM Dmitry Gutov wrote: > > On 12.02.2019 01:16, Jo=C3=A3o T=C3=A1vora wrote: > > And the second commit should encourage UI devs to start taking the > > completion-style-sort-order hint into account. If Dmitry does that in > > company-capf, we get decent flex completion for little cost. > > Note that if you adopt the approach I suggested (leave sorting to the > display-sort-function), it will work with company-capf automatically. > > And this can work in two ways: either the completion style adds text > properties and the sort function looks it up, or the completion style > (?) or the completion table does the sorting right away, and the > display-sort-function is #'identity. Apparently there is something I am still missing about display-sort-function. I admit to not have looked very hard at it. This is probably why I didn't understand your suggestion. Why don't we do this: I add the two (presumably) unproblematic commits (the new flex style + propertize completions with a numeric property), you show me a patch where display-sort-function is plugged into the style, supposing it is not very hard to do. Deal? Jo=C3=A3o --=20 Jo=C3=A3o T=C3=A1vora