Now auto-complete show list of values, used in other files, not in current, for example:

Wrong autocomplete lines


I use latest versions of all packages from MELPA, and my .emacs contain this strings for set settings:

(global-auto-complete-mode t)
(add-hook 'python-mode-hook 'jedi:setup)
(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
(setq jedi:complete-on-dot t)
(setq ac-auto-start 1)
;; More for tern, js2 and other...

I do'not change settings for auto-complete with sustomize.

How to remove unmatched values from auto-completion list?

  • That must be a dabbrev-style backend which picks not only words from your current buffer, but from other buffers as well. Have you had a look at the currently active backends for AC yet?
    – wasamasa
    Commented Jul 14, 2015 at 10:14
  • jedi, ac-emmet, ac-html, ac-js2 Commented Jul 14, 2015 at 10:42

2 Answers 2


You need to exclude some extra auto-complete sources in python-mode

For example:

   (add-hook 'python-mode-hook
             (lambda ()
               (delq 'ac-source-dictionary ac-sources)
               (delq 'ac-source-abbrev ac-sources)
               (delq 'ac-source-words-in-same-mode-buffers ac-sources)))

Hope this help.


customize-group auto-complete

Toggling Ac User Comphist to nil, saving and restart EMACS solve my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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