From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata? Date: Tue, 17 Aug 2021 17:49:39 +0300 Message-ID: References: <86a6uehpod.fsf@matem.unam.mx> <87v944wdxu.fsf@gmail.com> <847fabdb-8b06-dd0f-b2ad-6c71d2f5c3cd@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27014"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: 45260@debbugs.gnu.org, Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 17 16:50:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mG0Pt-0006qB-6n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 16:50:13 +0200 Original-Received: from localhost ([::1]:60836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG0Pr-0003iV-Lv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 10:50:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG0Pi-0003hc-MD for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 10:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mG0Pi-00061v-FP for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 10:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mG0Pi-0000uU-C3 for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 10:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Aug 2021 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45260 X-GNU-PR-Package: emacs Original-Received: via spool by 45260-submit@debbugs.gnu.org id=B45260.16292117923473 (code B ref 45260); Tue, 17 Aug 2021 14:50:02 +0000 Original-Received: (at 45260) by debbugs.gnu.org; 17 Aug 2021 14:49:52 +0000 Original-Received: from localhost ([127.0.0.1]:53757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG0PX-0000tx-JY for submit@debbugs.gnu.org; Tue, 17 Aug 2021 10:49:51 -0400 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:33482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG0PT-0000ti-RR for 45260@debbugs.gnu.org; Tue, 17 Aug 2021 10:49:49 -0400 Original-Received: by mail-wr1-f47.google.com with SMTP id r7so29145672wrs.0 for <45260@debbugs.gnu.org>; Tue, 17 Aug 2021 07:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=x/wprr18GlwKIdGBWp7CNhRjx2NiNewg6L40vPmnW3g=; b=PmsJuTB4oSJWqZ5TFYwxgmWtDhX4N52I1e9k7CuTRzxrMVQIcownfwncqMBbU362Lt hUIbdAkdaKWfAnQVc/dN7S92buy0V9t08k0oxtQs481U/KzlT/Bb5AmpEUE84UGhVQ66 ASjud64WZxvVaUxeKzPx2DsChsZW7JRlepnOcXDEjV7wrBwUeZxlv7RY1yuLUW9ZlFcA FbXJkGwP+6kOwc5vst+ZhefSt781Ph43BPzBX3t5BwV/8jkGgaO1hCxAuJELCtjYyNEL r6B/hEQReqhNTmStI/Ea8wQlmPf9hEIl5vjfvTYdFCtOl1l+r2ZfneTdgRy5CY12UZOv u/9A== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=x/wprr18GlwKIdGBWp7CNhRjx2NiNewg6L40vPmnW3g=; b=CTqZfD6CSYKkJ9zW+bXA/FJtY3n3p9idsnOQqEuXhaN0TFS4MfqWdqDBPQuKJuULDl OFxIOKEmkVDdBontkw6ocdwUy351HSkzEA8Rtc7IcZPxb8uYYi2ZNoVwk1s+uSzvcib7 OYIRYgkRpsJNg9Ll85aZLDFb7uadwkfarNW79tf3n0o/k1CXPfUSoetNYZh9XWESbBmx 88BDCY80YzozIXhSg1YjSiTvKiqQY+31hEUHPD9DeqZApfvGFKv7x2QAG1V7VRKdLKCh rvvC/JavmC/SvgxXB/E1r99QvT3UfDYOV2hUS7MFRYlP8Gc91c7MxxsQHH5C7gXHbv99 gBqQ== X-Gm-Message-State: AOAM533tJf4rt5ouQLH5INvSbs6I7W2OaQQgKxe5JSfOjLKvjCCN9nnJ qy6yYEN6UxEhDEkeAaqjOqI= X-Google-Smtp-Source: ABdhPJwsx/8mOYo4ShttrKF8gJehnfZ7zc8mY1SL411VEcMwvilwSFQQXvMHQwh9FDw8+DZASAy7fQ== X-Received: by 2002:a05:6000:114d:: with SMTP id d13mr4663487wrx.295.1629211781624; Tue, 17 Aug 2021 07:49:41 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g35sm2617010wmp.9.2021.08.17.07.49.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Aug 2021 07:49:40 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212091 Archived-At: On 17.08.2021 17:05, João Távora wrote: > On Tue, Aug 17, 2021, 13:43 Dmitry Gutov > wrote: > > On 17.08.2021 13:41, João Távora wrote: > > I've > > not seen an example of a table where its original sorting > mattered more > > _when_  there is some search pattern. > > Do you have examples of completion tables which do specify sorting, but > where flex sorting obviously should take precedence? > > > No, do you? Love to see them, or the converse. But does it matter? Flex > is for searching with patterns, stable sorted by scores, solving ties > with whatever sort order came first. Dmitry/flex, or Flix, or Flax, may > be something else, you understand? It's by design like this. If there aren't any such significant cases, flex could do what Omar is suggesting, solving the reported problem with no real downside. I would admit it to be a hackish move, but no more so than the recent commit ab23fa4. Having multiple similar styles is of course an option, but it comes with code duplication and associated inconveniences (how many such styles should Emacs include OOTB?). That could be solved with some more general approach, like have both styles and completion tables return sorting scores (with documented possible values and meanings), and do the combined sorting somewhere in the layer above. Then the user could choose the combining strategy, configured separately.