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 Jul 14 '15 at 10:14
  • jedi, ac-emmet, ac-html, ac-js2 – Dunaevsky Maxim Jul 14 '15 at 10:42

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.


| improve this answer | |
customize-group auto-complete

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

| improve this answer | |

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.