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

From: Carlos Pita <[email-masked]>
Date: Tue, 16 Nov 2021 19:48:39 -0300

> I did not know this.  Thought company is the OOTB one, than an external thing.
> How does one use the auto-completion you are discussing?

This is described in the manual:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Symbol-Completion.html

Be aware that it's not a fancy popup that updates itself while you're
typing, instead it's more like what you get in bash. Nevertheless:

- The protocol is already there, when you install company most of the
things work OOTB because of the core protocol. Of course if company
adds extra features on top of it there is no way this could be
supported without installing further company-.* extensions as the ones
you listed at the top, but there is ample consensus not to do
that without good reason and alternatives have already emerged with
core APIs full-compatibility as a strong guiding principle. I
encourage you to visit the projects in https://github.com/minad/,
especially vertico, consult, embark, marginalia and corfu. You don't
need to install anything, just read about them and decide, you can
pick only the parts that you're interested in. I've only installed
corfu for now because I find the child frame nicer and more
convenient than the default UI, but I could easily live without
that.

- The protocol is already very customizable without installing
anything else. See for example the variable completion-styles. You can
set it to flex for fuzzy matching. You mentioned you're using
orderless: it also leverages this core mechanism in order to provide
a different completion strategy.

So, as you can see, there is more here than you first thought, it's
not really "haphazard evolution".

> once something becomes a fundamental functionality (e.g. completion),
> evolution should move consciously after some time.

I hope I've convinced you this is indeed what's happening. Indeed,
most of what I've described has been there for many many years.

>  I use ivy, company and orderless.

ivy implements its own protocols, be aware that there is a world of
ivy-.* stuff too. Also be aware that some of the packages in
https://github.com/minad/ are alternatives to ivy (it's not another
case of NIH though, because the idea is to stick to the roots for
good).

ivy can do completion-at-point too:

https://www.reddit.com/r/emacs/comments/57fnar/ivy_completion_at_point_in_an_overlay/

Maybe that's enough for your needs so you don't have to install anything else.

Best regards,
Carlos