Closed sooheon closed 8 years ago
Does it have to do with the auto-compilation, maybe? I only get the error when emacs tries to load the .elc file, when I delete that use-package works as intended.
Warning (initialization): An error occurred while loading ‘/Users/sooheon/.emacs.d/init.elc’:
Symbol's value as variable is void: evil-insert-state-map
Relevant issue: https://github.com/jwiegley/use-package/issues/332
The problem seems to be that evil does something strange. I greped its source and could not find the place where the the variable evil-insert-state-map
is declared. I found some define-key
forms that add bindings to the value of that variable, but where the initial value, a keymap with no bindings, comes from I do not know.
A wild guess would be that you have to enable evil-mode
before you can start customizing this and other keymaps. That might make it impossible to use use-package
s :bind
, but you can always use bind-keys
directly.
It's not just evil-mode. I can confirm it happens with lispy-mode-map and ivy-minibuffer-map, and probably all the others. You're right though, I can put the binding in the regular way.
I don't think this has anything to do with borg
. And if this isn't specific to evil
, which certainly is special with regards to key bindings, then I have no idea what might be wrong.
I think you're right, it's more appropriate to discuss in use-package. Thanks.
He, later I ran into this issue myself https://github.com/jwiegley/use-package/issues/378. And I have a fix cooking in https://github.com/jwiegley/use-package/pull/419.
For some reason, using use-package in this manner does not work correctly. The compiler complain that the declared map doesn't exists, when it should precisely be waiting until that gets loaded to make the bindings. Any idea what's up?