I have recently encountered a problem with autocomplete when used together with linum. When I turn on the global-linum-mode, the emacs only shows part of the popped-up menu of candidates correctly. For example, after typing 'add' at line 11, several lines of the popup menu for autocomplete are blocked by white space after the first letter of the candidate words, as shown in the following figure:
After a few trials, I found the error occurs when the autocomplete is aroused if the word to be completed (in this case the word 'add') starts from the first or second column. In addition, to reproduce the error, the popup menu needs to be overlapped with some text in the document (there are text in line 12-18 in the example).
The following minimum configuration in the .emacs file can be used to reproduce the error:
(add-to-list 'load-path "~/.emacs.d/lisp") (require 'auto-complete-config) (ac-config-default) (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict") (global-auto-complete-mode t) (defun auto-complete-mode-maybe () ; "No maybe for you. Only AC!" (unless (minibufferp (current-buffer)) (auto-complete-mode 1))) (require 'linum) (global-linum-mode t) (setq linum-format "%4d")
I use GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6) of 2015-09-17 on lgw01-52, modified by Debian on a linux machine (Ubuntu 15.10).
Any help is appreciated and please feel free to let me know if my question is unclear. Thank you.
EDIT: It seems that this is a bug in emacs 24.5, shown by the following link:
In addition, the following error messages occur when the popup menu fails to show up completely:
Error running timer `ac-update-greedy': (wrong-type-argument wholenump -259) Error running timer `ac-show-menu': (wrong-type-argument wholenump -120)
I will keep searching for solutions and update this question if I find one.