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. ...


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 ...


11

After doing a long research in the web and careful examination of ac documentation with a lot of trials on my machine to examine code line by line, I came up with this solution that can have yasnippet working as well (optioinal) without any confict. put this in your init.el or .emacs taking care of sequence: (require 'package) (package-initialize) ;; ...


8

Try this: (add-hook 'js-mode-hook 'my-javascript-hook) (defun my-javascript-hook () (company-mode -1) (auto-complete-mode 1))


7

I added the following code to solve most of my problem: (setq ac-source-yasnippet nil) But, it caused complexity between yasnippet and auto-complete so I added this: (define-key yas-minor-mode-map (kbd "<tab>") nil) (define-key yas-minor-mode-map (kbd "TAB") nil) (define-key yas-minor-mode-map (kbd "<backtab>") 'yas-expand) Modified some ...


6

As a workaround, you can redefine the Yasnippet expansion key instead, as explained in the FAQ: (define-key yas-minor-mode-map (kbd "<tab>") nil) (define-key yas-minor-mode-map (kbd "TAB") nil) (define-key yas-minor-mode-map (kbd "<C-tab>") 'yas-expand) In this way, you use <C-tab> to expand Yasnippets and the TAB key for auto-complete-...


6

This is really a limitation of Emacs' overlay system, upon which auto-complete and popup rely: the overlays are positioned using text column offsets, not pixels. So your options are indeed as you outlined. The path of least resistance is to use a fixed-width font with a variety of styles. My personal favourite is Input Mono, FWIW.


6

If the function isn't defined at startup, that probably means the file containing the function hasn't been loaded yet. The function global-auto-complete-mode is in the file auto-complete.el, which you can see with C-h f, so the first thing to try is to execute (require 'auto-complete) before calling the function.


6

As I told in my above comment, the package auto-complete-auctex can also solve the problem. I tested both, and they both work nicely. It would be nice to compare the solution of @doctorate and the above package by giving screen-shots. If I write $\sig$, the code of doctorate give something like this and that of the package auto-complete-auctex gives ...


5

The ESS development environment seems to support julia out of the box. According to the documentation, it supports most of the features you mentioned: completion code evaluation error navigation (there doesn't seem to be a full debugger yet, though)


5

That is because jedi is a Python library that statically analyzes Python code to suggest completion candidates. Installing the jedi.el package enabled its abilities for auto-complete-mode and extended them beyond the suggestion of already used words and predefined ones. If you wish to have the same experience with Javascript, you will either need to find ...


5

The following has been tested to work on an emacs -Q session: Launch emacs -Q Add the below in the scratch buffer: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) Evaluate the buffer (M-x eval-buffer) Do M-x package-install RET auto-complete RET The package will install. Note that step 4 will ...


5

Package installation isn't intended to enable packages. Rather, installation makes code available for use. So some config is generally required for non-trivial packages. Fortunately, auto-complete comes with auto-complete-config, so you might try initialization code like the following: (require 'auto-complete-config) (global-auto-complete-mode t) (set-...


5

When Emacs opens a .tex file, it runs the tex-mode function, which tries to guess what format the file is for and invokes plain-tex-mode or latex-mode (or slitex-mode) accordingly. If you want to force a specific file to be opened in LaTeX mode, use a file variable. Put this line near the top of your .tex file: %% -*-latex-*- or these lines near the ...


5

You need to tell company-mode what backend to use. In my init file I have the following code (add-hook 'go-mode-hook (lambda () (set (make-local-variable 'company-backends) '(company-go)) (company-mode))) You will also need the gocode autocomplete daemon which you can get by executing go get github.com/nsf/gocode.


4

The following is my auto-complete related configuration: (require 'package) (package-initialize) (require 'auto-complete-config) (ac-config-default) ;; Activate auto-complete for latex modes (AUCTeX or Emacs' builtin one). (add-to-list 'ac-modes 'latex-mode) ;; Activate ac-math. (eval-after-load "latex" '(when (featurep 'auto-complete) ;; See https:...


4

auto-complete defines three keymaps that might be relevant here: ac-mode-map: This map is active when auto-complete-mode is enabled. ac-set-trigger-key adds the binding for the trigger key to this map. ac-completing-map: This map is active during completion. By default, TAB is bound to ac-expand in this map. ac-menu-map: This map is active while the popup ...


4

company-mode has a files backend:


4

A vanilla company install wont quite get you where you want; you'll need to use use something like the company-c-headers package. Tuhdo has written an excellent document on using Emacs as a C/C++ IDE, which has instructions on setting up company-c-headers, along with a lot of other stuff. I don't know what Emacs version you're using, but in 24.5 with ...


3

You must add the urls for gnu, melpa, marmalade repositories in .emacs file (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") ("melpa" . "http://melpa.org/packages/"))) After doing this, run M-x package-refresh-contents and M-x auto-complete. It should work.


3

I am currently using these 2 Emacs packages: julia-mode julia-repl everything is detailed in the julia-repl author's blog post. It is the best I have found so far. I am quite happy with it and I prefer it to the previously cited ESS-Julia solution. I still miss an auto-complete solution for Julia, though.


3

I tried to create a minimal config that would have a working auto-complete and this is what I came up with. (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (package-initialize) ;load and activate packages, including auto-complete (ac-config-default) (global-auto-complete-mode t) Try that out and see if it ...


3

Add below line should work: (add-hook 'emacs-lisp-mode-hook 'ielm-auto-complete)


2

Repeating my response at S.O. - Put (setq debug-on-error t) at the beginning of your init file. Or better yet, append --debug-init to the command line you use to invoke Emacs. That will open the debugger when the error occurs. But it seems that the file that has (provide 'autocomplete) in it, or that file's directory, is not in your load-path. When the ...


2

If you install yasnippet and ac-go-expand-arguments-into-snippets is non-nil(Default is t) then argument snippet is expanded like following animation gif. company-mode provides such feature by itself, so you can use it without yasnippet by company-mode.


2

Just in case someone comes across this question; I was able to do this by essentially turning on tab completion from R as follows: (require 'auto-complete-config) (ac-config-default) (define-key ac-completing-map (kbd "M-h") 'ac-quick-help) ;; Get tab completion in R script files ;; See this page here ;; https://stat.ethz.ch/pipermail/ess-help/2013-March/...


2

auto-complete also has this feature, via its built-in (ac-source-filename) backend. In addition, for c/c++, there is auto-complete-c-headers, see https://github.com/mooz/auto-complete-c-headers. Here is a screenshot of the latter:


2

You should be able to just enable company-mode globally without any problems with Elpy (if there are any, please do file a bug report!). You can also use auto-complete in buffers other than Python mode buffers (auto-complete supports different backends from company-mode, so might be preferable for some), by removing python-mode from ac-modes. This will then ...


2

You can configure max width by ac-max-width. Could you set its value, for example 0.5 as below ? (setq ac-max-width 0.5) I suppose this issue is not occurred in company-jedi


2

Predictive-mode claims to be what you're looking for, though I'm not sure how it compares to more modern completion frameworks like company-mode.


Only top voted, non community-wiki answers of a minimum length are eligible