syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

auto-complete sometimes not works for org mode #9193

Closed zhewuzhou closed 4 years ago

zhewuzhou commented 7 years ago

Environment:

Emacs 25.2.1 (x86_64-apple-darwin15.6.0) of 2017-04-22 on ElCapitan-2.local Company 0.9.3

company-backends: (company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-files (company-dabbrev-code company-gtags company-etags company-keywords) company-oddmuse company-dabbrev)

Used backend: company-dabbrev

However When I:

  1. open a ELisp file at first place
  2. using help-projectile switch to a org file

auto complete doesn't work, here is what I get from company-diag:

Emacs 25.2.1 (x86_64-apple-darwin15.6.0) of 2017-04-22 on ElCapitan-2.local Company 0.9.3

company-backends: nil Used backend: nil Major mode: org-mode

And when I enable global-company-mode in user-config, this never happen, but I know enable company globally is not a good idea because it conflict with the architecture principle of Spacemacs, so I am looking for proper solution for this instead of global-company-mode.

I spent 1 day on this, but can not understand why this happen, I suppose somehow when switch mode company-backends aren't initialized correctly. Can someone shed light on this?

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!