pycomplete.el removes other useful ac-sources
Bug #1071441 reported by
Vinod
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Urs Fleisch |
Bug Description
Autocompletion in a python buffer only uses the ac-source-
It reads: (setq ac-sources '(ac-source-
when it should read: (add-to-list 'ac-sources 'ac-source-
Related branches
lp:~ufleisch/python-mode/improve-completion
- Andreas Roehler: Approve
-
Diff: 74 lines (+24/-9)2 files modifiedcompletion/pycomplete.py (+16/-4)
completion/test_pycomplete.py (+8/-5)
Changed in python-mode: | |
assignee: | nobody → Urs Fleisch (ufleisch) |
importance: | Undecided → Medium |
milestone: | none → 6.1.1 |
Changed in python-mode: | |
status: | New → In Progress |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The code completion provided by ac-source- pycomplete tries to be intelligent. For example, when completing a variable, it will only complete local variables defined in the def, parameters of the def and global variables defined in the module. The completions provided by default (ac-source-abbrev, ac-source- dictionary, ac-source- words-in- same-mode- buffers) are not very intelligent, they may have been useful when no other intelligent code completion was available, but why would you want to add such completions? Code completion is not useful if the completions are not valid and just suggesting any word found in any other Python buffer makes completion useless. If you think that some real code completions are missing in ac-source- pycomplete, please report it and we can try to fix that.
If you really want to use other completion sources together with ac-source- pycomplete, just add this to your Emacs initialization file:
(add-hook 'python-mode-hook '(lambda () (setq ac-sources '(ac-source- pycomplete ac-source-abbrev ac-source- dictionary ac-source- words-in- same-mode- buffers) )))