racer-rust / emacs-racer

Racer support for Emacs
398 stars 48 forks source link

Error on showing completion - Company: backend company-capf error "Symbol's function definition is void: block" #14

Closed barometz closed 8 years ago

barometz commented 8 years ago

Wasn't sure where to put this, but after finding https://github.com/JuliaLang/julia/issues/852 it seems plausible that this is something fixable within this package.

I've got emacs-nox 24 on Debian testing set up with racer and everything appears to work, but whenever I request a completion for anything I also get the following in my minibuffer:

Error running timer `company-echo-show': (error "Company: backend company-capf error "Symbol's function definition is void: block\" with args (meta Broadcast)")

Messages\ contains the following, where the first line appears as I open a rust file:

Error during redisplay: (jit-lock-function 1) signaled (void-function block)
Error during redisplay: (jit-lock-function 140) signaled (void-function block) [4 times]
Error running timer `company-echo-show': (error "Company: backend company-capf error \"Symbol's function definition is void: block\" with args (meta Broadcast)")

The linked (and solved) issue in julia-mode seems to be essentially the same behaviour, but it's thoroughly unenlightening as to what the actual problem was. The core seems to be that something somewhere in the company pipeline is trying to use a function block which is not defined on some systems ("function definition is void", "void-function block")

Aaand I just noticed I'm getting the same error from eldoc: eldoc error: (void-function block) which is less of an issue as I'm okay with turning eldoc off. On the other hand, this increasingly suggests there's something weird with my system.

2016-02-17 2

fbergroth commented 8 years ago

Maybe you're using rust-mode without compiling it?

A quick fix to get rid of the errors would be to put (require 'cl) early in your emacs init file.

barometz commented 8 years ago

Thanks! (require 'cl) did the trick. Odd. I did install rust-mode through melpa, and the compile log tells me things were compiled, so that's not where I went wrong. Glad to have a resolution, still wondering what was actually broken.

fbergroth commented 8 years ago

I have no idea either. You can run M-x toggle-debug-on-error so you'll get a backtrace to work with.

barometz commented 8 years ago

Turns out there's an elpa-rust-mode package in the Debian repos that works out of the box. I guess that counts as solved in context.