Subject: bug#51819: The Senselessness of Emacs Company Mode

From: irenezerafa <[email-masked]>
Date: Tue, 16 Nov 2021 19:22:51 +0000

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, November 15th, 2021 at 6:51 AM, Carlos Pita <[email-masked]> wrote:

> Lars Ingebrigtsen [email-masked] writes:
>
> > irenezerafa [email-masked] writes:
> >
> > > I am installing Company Mode so I can use auto completion. Let me
> > >
> > > show you how beautiful that is using the emacs way. For most people,
> > >
> > > they do "M-x list-packages" and search for "company". They get about
> > >
> > > 70 matches for "company-mode" which add compatibility for other modes.
> >
> > I think most people are able to figure out that they should add the
> >
> > package called "company" if they want to install Company. (It's
> >
> > conveniently listed first among the packages that are Company-related.)
>
> Moreover, there is little gain in using company-specific extensions
>
> these days. Most completing-read frameworks offer completion-at-point
>
> compatibility, which inherits all the goodies from completing-read. And
>
> if you prefer an in-place popup install corfu which shows a child frame
>
> with zero extra config. Even company is moving more and more towards its
>
> capf backend. Maybe some extensions still require or greatly benefit
>
> from some company-specific protocol, but this is not the norm nowadays.
>
> I'm using a combo of fido-mode + corfu which, if I wanted, could be
>
> extended with consult, embark, marginalia, orderless, etc. I prefer to
>
> keep it small, but the beauty of the new "completion stack" is that the
>
> building blocks follow standard emacs protocols and are intercompatible
>
> (so it's completely fine to use any of them with icomplete/fido). This
>
> is all the configuration I need to get a "modern" completion experience:
>
> (setq completion-styles '(flex basic))
>
> (icomplete-vertical-mode +1)
>
> (fido-mode +1)
>
> (corfu-global-mode +1)
>
> The only external dependency is the minimal, high-quality corfu
>
> extension.
>
> I understand the OP's frustration though, because this simplicity is not
> a given but the result of an exhausting process of research and
> refinement, there are a lot of options and (ill-)advice usually comes in
> the form of installing yet another extension. One has to learn many
> things that would be better not to know.

I am pleased to see you understand my point, because the development geniuses
can't.

> One complaint I have is that icomplete doesn't offer a builtin
> completion-at-point mode. Strictly, it offers one but it's rather broken
> (see my report #51575). I believe it would be easy to channel
> completion-at-point to the minibuffer as other extensions more or less
> trivially do, although this is not compatible with LSP servers. OTOH an
> at-point popup is likely harder to implement and both overlays and child
> frames have their own drawbacks (again, see #51575). In any case, a
> builtin solution is not scifi at this point and, since the community is
> already converging around core protocols, I see this as an opportunity
> to greatly simplify the completion story.
>
> Best regards,
>
> Carlos