Closed haji-ali closed 3 years ago
It seems company does not enable itself when the buffer name starts with a space like the minibuffer (see company-mode-on
). But then Radian's remapping of completion-at-point
to company-manual-begin
is questionable IMO.
I resolved this issue with the following re-mapping instead
(use-package company
:bind
([remap completion-at-point] . #'my/company-completion-at-point)
:config
(defun my/company-completion-at-point ()
(interactive)
(if company-mode
(call-interactively 'company-manual-begin)
;; if company mode is not enabled call the standard completion-at-point
(call-interactively 'completion-at-point))))
Hey, thanks for tracking this down! I've had this error for a few years but never bothered to do anything about it. In https://github.com/raxod502/radian/commit/87c1ba2e17e7be0a736368b03f8682e87abb231f, I put the company-manual-begin
bindings behind a :filter
clause that will activate them only when company-mode
is non-nil, which seems to fix the problem.
Yep, that's a much better solution. Thanks!
On a non-customized radian setup, I am getting the error
user-error: Company not enabled
when I pressM-:
(orM-x
eval-expression
) and presstab
after typing anything.I tried setting
debug-on-error
,debug-on-message
anddebug-on-entry
so I can capture a call stack without luck.