How is TAB to auto complete using org-mode?

I set auto-complete-mode and I am using org-mode. When I press TAB to automatically fill in words, it instead tries to back out of line. Sometimes he discards the whole paragraph, sometimes he does nothing.

I tried setting the variable (setq tab-always-indent 'complete) and changed it to nil, but now when I press TAB, it just inserts tabs on the screen.

I know that you can successfully use org-mode with yasnippet and automatically shut down as it is right, because Emacs Live box works.

+6
source share
2 answers

Autocomplete uses the ac-modes variable to decide whether to enable autocomplete in a specific mode, by default org-mode not in this list. To enable autocomplete in org-mode just add it to ac-modes , something like this should work

 (add-to-list 'ac-modes 'org-mode) 

Also, to finish using tab, you need to set ac-trigger-key to tab like this (link to manual )

 (ac-set-trigger-key "TAB") 
+6
source

For me, the solution was to install org-ac from melpa-stable. This made Emacs show the completed word after the cursor, as if I had already typed it, but in a different color. Using Tab accepts this completion.

(Emacs: GNU Emacs 24.5.1 )

+1
source

All Articles