unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "João Távora" <joaotavora@gmail.com>
Cc: 45260@debbugs.gnu.org, "Omar Antolín Camarena" <omar@matem.unam.mx>
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	[thread overview]
Message-ID: <deb8799c-fdb4-c4e1-bda6-f72e7095ea87@yandex.ru> (raw)
In-Reply-To: <CALDnm52gRPvU4aSCUzUQUa1zCUzXLu_e7kB2eJp33eAtRMeAZg@mail.gmail.com>

On 17.08.2021 17:05, João Távora wrote:
> On Tue, Aug 17, 2021, 13:43 Dmitry Gutov <dgutov@yandex.ru 
> <mailto:dgutov@yandex.ru>> 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.





  reply	other threads:[~2021-08-17 14:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 18:47 bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata? Omar Antolín Camarena
2021-08-17 10:41 ` João Távora
2021-08-17 12:42   ` Dmitry Gutov
2021-08-17 14:05     ` João Távora
2021-08-17 14:49       ` Dmitry Gutov [this message]
2021-08-17 15:27         ` Omar Antolín Camarena
2021-08-17 16:58           ` João Távora
2021-08-17 16:38         ` João Távora
2021-09-27 23:11           ` Dmitry Gutov
2021-09-27 23:25             ` João Távora
2021-09-27 23:40               ` Dmitry Gutov
2021-09-28  0:36                 ` João Távora
2021-09-28  0:39                   ` João Távora
2021-09-28 12:38                   ` Dmitry Gutov
2021-09-28 16:09                     ` João Távora
2021-09-28 16:30                       ` Dmitry Gutov
2021-09-28 22:17                         ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=deb8799c-fdb4-c4e1-bda6-f72e7095ea87@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=45260@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=omar@matem.unam.mx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).