Subject: bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata?

From: Dmitry Gutov <[email-masked]>
Date: Tue, 28 Sep 2021 02:40:07 +0300

On 28.09.2021 02:25, João Távora wrote:
> On Tue, Sep 28, 2021 at 12:12 AM Dmitry Gutov <[email-masked]> wrote:
> 
>> Please go ahead and fix your own code in any way you like.
>>
>> Here's an example of user confusion that the current behavior invokes:
>>
>> https://github.com/company-mode/company-mode/discussions/1223#discussioncomment-1387929
> 
> That's a very large discussion with lots of company-mode-specific details.
> Can you post an example of Emacs -Q where Emacs does something that
> would you would not like it to do?  That's a bare minimum for discussion
> to resume here.

It's an example of a user trying to write a completion table (to be 
consumed by company-capf, as they usually are) with sorting logic and 
tripping over the flex style overriding it.

> If you just wish to haphazardly shoot some issue reference to vaguely
> blame my work for your company-mode troubles or frustration, I think
> that's a very petty thing to do.  If not, please collaborate.

The problem is more or less understood: flex overriding the sorting 
logic even if it's defined in the table.

There is no point in me retelling the discussion. It is itself a piece 
of evidence for the problem existing. Maybe not categorical evidence, 
but evidence nevertheless.

You should read it (the last few messages will suffice).

> I think I explained that flex has certain semantics regarding sorting.
> Yes, those are the semantics that I like when I created it.
> I think I've also explained that if you don't like those semantics you
> can utilize functions to create a new completion style with semantics
> that you like.  I even offered to help you do that.  But then again,
> I have no idea what you are bringing up in that link.

flex is popular enough. People use it. I end up having to diagnose 
people's problems.

Having many similar-but-slightly-different styles available is unlikely 
to reduce my support burdens.