1

I am getting error messages initializing some company backend packages, but messages only appear in the *Messages* buffer, like:

Company backend 'company-web' could not be initialized:
Symbol's function definition is void: company-web
Company backend 'company-quickhelp' could not be initialized:
Symbol's function definition is void: company-quickhelp
Company backend 'company-php' could not be initialized:
Symbol's function definition is void: company-php

I can't find a way to spot the problem, my current .emacs relevant code is:

(use-package company-web)
(use-package company-quickhelp)
(use-package company-php)
(use-package company
  :bind (("C-?" . company-complete))
  :config
  (global-company-mode t)
  (add-to-list 'company-backends 'company-php)
  (add-to-list 'company-backends 'company-quickhelp)
  (add-to-list 'company-backends 'company-web)
  ) 

Notes

  • Using use-package)
  • --debug-init doesn't show anything

Update: Fixed company-php and company-web but not company-quickhelp

Fix company-php and company-web:

(use-package company-web
  :config
  (require 'company-web-html))
(use-package company
  :bind (("C-?" . company-complete))
  :config
  (global-company-mode t)
  (add-to-list 'company-backends 'company-web-html) ;; changed from company-web
  (add-to-list 'company-backends 'company-ac-php-backend)
  )

company-quickhelp still shows the error in *Messages* with:

(use-package company-quickhelp
  :config
  (company-quickhelp-mode 1))
4
  • try (use-package company-web :ensure t). And add your backends this way (add-to-list 'company-backends '(company-php company-quickhelp company-php)). And add your backends for the major mode you need them for and not in your company config.
    – bertfred
    Commented Oct 21, 2016 at 10:21
  • @bertfred Question updated, the problem with company-web was the way of adding it to the backend list, just company-quickhelp isn't working now. (I have added other backends the same way and works fine)
    – marcanuy
    Commented Oct 21, 2016 at 10:33
  • What error are you getting with company-quickhelp ? Also, you'd have to place company-quickhelp either inside companys config or after companys use-package decleration. Commented Oct 21, 2016 at 12:29
  • Also, it's better to create a local company-backends variable for each major-mode and add company backends to that variable. Commented Oct 21, 2016 at 12:31

0

Your Answer

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

Browse other questions tagged or ask your own question.