company-box icon indicating copy to clipboard operation
company-box copied to clipboard

Using company-box breaks my Emacs

Open guilherme-salome opened this issue 5 years ago • 2 comments

I am running GNU Emacs 26.1 on MacOS, and I have a pretty minimal setup for Python (only emacs-jupyter and nothing more). I am trying to get completion working with company, but while following this tutorial, I ran into an issue.

The issue shows up when I execute the following:

;; Company Mode
(use-package company
  :defer 2
  :diminish
  :custom
  (company-begin-commands '(self-insert-command))
  (company-idle-delay .1)
  (company-minimum-prefix-length 2)
  (company-show-numbers t)
  (company-tooltip-align-annotations 't)
  (global-company-mode t))
;; Nice icons for Company Mode
(use-package company-box
  :hook (company-mode . company-box-mode))

Specifically, after I execute the line for company-box, I start getting an error when trying basic commands like C-x b or C-x C-s. This is the error I see: Error in post-command-hook (global-company-mode-check-buffers): (file-missing "Cannot open load file" "No such file or directory" "company-box"). After the error I cannot even quit Emacs with C-x C-c.

guilherme-salome avatar Aug 07 '19 13:08 guilherme-salome

I was getting the same error after my initial installation, and when looked into the details it showed errors related with other packages (like all-the-icons).

So, I did a M-x package-refresh-contents, followed by M-x package-list-packages and applied all the available updates, and finally restarted emacs. The problem was gone after this.

hakanserce avatar Oct 04 '19 23:10 hakanserce

I had to add :ensure t in my config for company and company-box like that:

(use-package company-box
  :ensure t
  :hook (company-mode . company-box-mode))

I use :ensure t all the time, but if you don't use it to install packages automaticatlly, just make sure you install the company and company-box packages with package-install (or however you install packages)

Melkor333 avatar Jan 02 '20 08:01 Melkor333