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, 28 Sep 2021 19:30:49 +0300	[thread overview]
Message-ID: <e8745aec-9af6-7fae-1cb0-cc05bff856ac@yandex.ru> (raw)
In-Reply-To: <CALDnm50-di+u9s_Fhe6PA7-XdtOO5acV8vX_oJmATdgk77w+pg@mail.gmail.com>

On 28.09.2021 19:09, João Távora wrote:
> On Tue, Sep 28, 2021 at 1:38 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
>> So the references to company-capf in that discussion are necessary, but
>> incidental.
> 
> So it should be possible to describe the problem in simpler terms.  Which
> is what I'm asking you to do.  In the simplest terms _possible_ of course.

I have already done this here. Twice, I think?

And more, if we count the underlying technical issue that is the 
headline of this report.

> It's not about the beginner developer here, it's about the user.

The user-developer line is fairly blurred in this particular case.

> The beginner developer of the c-a-p-f API has to do more work
  than the user to understand what the purpose is of the things
> she is invoking.  If she invokes 'flex' in some program, she must
> be aware of what she's doing, of how 'flex' works.

That seems optimistic. Especially since 'flex' is a rare exception among 
other completion styles, in that it affects sorting (through an opaque 
mechanism), and not just filtering.

>> But would it? Break existing behavior in any scenario that matters?
> 
> See my reply to Omar.

Omar brought in a scenario of something the user does, starting with the 
UI, and the full use case.

You responded with an abstract piece of behavior.

In your scenario, which UI is the user going through? What completion 
table would they be querying?

How much effort would it be for such UI to switch to a completion table 
that doesn't specify the sorting function, so that 'flex' still applies 
its sorting, to the satisfaction of your hypothetical user, while now 
satisfying Omar's user as well?

>>> What is the problem with you telling those users to use 'pikachu'
>>> instead of 'flex'?  Or tell them to set a hypothetical variable
>>> flex-prefer-table-sorting to t?
>>
>> Discovery.
> 
> So you're talking about changing defaults.  But flex is not even the default,
> so I don't understand.  Why are people using it if they're not content with
> what it does?
> 
> Do a 'flix' style, as I've suggested multiple times! Look,  if you're right and
> it represents much less friction it should rapidly become popular and your
> burdens will be solved.  It probably take few lines of code.

I didn't do 'flex' and I don't do 'flix'. I'm not the 
person/place/piece-of-software people come to for completions styles. I 
have to deal with existing styles. Even if just one of them has a 
problem, that can bring a question or a bug report on my doorstep.

Furthermore, 'flex' being in the core implicitly gives it a strong 
recommendation over alternatives.

>>> I also suggest that people: "if you're writing a completion table, make
>>> sure you try it without company as well".
>> Not something I'm eager to recommend to somebody just starting out. It
>> wouldn't help here either, I believe.
> 
> So you decide that it's a good idea for a beginner to mix company internals
> into her adventures.... Questionable, I'd say.

See the thread.





  reply	other threads:[~2021-09-28 16:30 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
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 [this message]
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=e8745aec-9af6-7fae-1cb0-cc05bff856ac@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).