Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs auto-complete popup menu broken

I'm have reinstalled my emacs and now I'm using emacs v24.3.50 with auto-complete v1.4 and popup.el v0.5. Unfortunately the popup "menu" of auto-complete is kinda broken (see attached screenshot).
The different items are not aligned along a commong vertical line [ignore the black overlay, that stems from CEDET and is probably meant to be placed on the right side next to the popup menu; the problem remains when disabling CEDET, so it is not related).

example of error

From what I can tell it looks like the extent of this "shift" between lines depends on how much the length of the strings differs. Also, when selecting a different suggestion using the arrow keys the horizontal shift of the lines changes a little (~few pixels) each time the mark is moved one line up/down.

I have uploaded the part of my .emacs.d/init.el that is used for configuring auto-complete here.

Any suggestions on how to fix this?

like image 306
elemakil Avatar asked Nov 05 '12 23:11

elemakil


1 Answers

It appears you are using a proportional font, which breaks the calculation of the left edge of the overlay.

You can try changing the way auto-complete computes the column:

(setq popup-use-optimized-column-computation nil)

You can also change to a fixed width font.

Note that some other completion systems for Emacs can use tooltips instead of overlays, which would avoid this problem.

like image 138
Dwight Holman Avatar answered Oct 20 '22 09:10

Dwight Holman