52

There seem to be two major autocompletion extensions for emacs: autocomplete and company mode. What are some of the practical differences between the two and when would I want to use one over the other? Also, are they compatible with each other?

  • 1
    What do you mean by “Also, are they compatible with each other?”? Are you asking if they can be used at the same time? Or if the sources of one can be used by the other? – Malabarba Oct 6 '14 at 13:06
  • If they can use the same sources – Connor Oct 6 '14 at 14:51
  • 3
    github.com/company-mode/company-mode/issues/68 (not much more to add). – shosti Oct 6 '14 at 18:13
34

I've used autocomplete-mode for a good a few years and switched to company-mode a couple of months ago.

In basic usage there's not much of a difference. Like someone else posted this link has a good summary of the differences.

I found company-mode to be easier to configure and to let it do what I want it to. With autocomplete-mode I ran into issues now and then of something not working the way I wanted it to and then something else falling over when tweaking it. In usage, I rarely feel company-mode is in the way when using Emacs while autocomplete-mode did get in the way now and then.

Also, for developers it is easy to add support for their packages to company-mode, see: EmacsWiki:CompanyMode:Backends.

They are not compatible with each other. For now, there's more packages that support autocomplete-mode but that is changing fast.

tl;dr. They pretty much do the same thing. Start with company-mode and try autocomplete-mode if you miss anything from the former.

39

They're pretty much equivalent, but company-mode has a better thought-out API for plugin developers. It's also much more actively maintained. But there are two key differences which may or may not matter to you:

Firstly, company-mode now targets Emacs 24, so if you're stuck with Emacs 23 then you're out of luck. auto-complete still works with Emacs 23.

Secondly, auto-complete has a "popup docs" mechanism which displays a tool-tip-like yellow overlay in the current buffer showing info about the symbol at point. IIRC, company-mode can pull in the same info, but it does it in a separate window right now.

There's an issue filed for that, and it seems likely that company-mode will gain popup doc support, perhaps via an add-on package. Historically, such popup windows have been somewhat buggy, so it might be worth getting used to company's separate-window approach.

If you're starting afresh now, and you have Emacs 24, company-mode is the way to go.

  • 11
    As an aside, I think the name is unfortunate. I had assumed that company-mode had something to do with managing multi-user projects (as in a project run by a company). I would have found it earlier if it had an obvious name like autocomplete does! – Tyler Oct 7 '14 at 17:59
  • 12
    Yes, comp-any would have been clearer than company. – sanityinc Oct 7 '14 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.