0

My setup worked perfectly fine, however I recently reinstalled Emacs and therefore updated all packages as well when starting for the first time.

Since then I cant get rid of the warning/error: Error (use-package): general/:config: Key sequence SPC x starts with non-prefix key SPC

Relevant part of my config:

(general-define-key
   :states '(normal emacs motion)
   :prefix "SPC"

   "x" 'counsel-M-x )

I already tried:

  • unbinding SPC before it is used as a prefix
  • have my keybindings load after everything else
  • using alternative definitions for using spacebar to "SPC" for example with kbd

What is especially weird to me, is that the keybinding and all others that are prefixed with SPC work perfectly fine like they should (even SPC x). C-h k SPC also gives me the associated results. I also know that this is related to general.el especially because manually copying and using an old copy of the package doesn't give me this error

0

I'm using general too. I successfully got rid of this error (see part of my .emacs that does this in the picture below). The space key in evil-motion-state is bound to something so you have to set it to nil before general can bind it. I don't think the evil-normal-state binds anything to space but I did the same thing for it just in case. I think to make your code work you'd just do what I did but add emacs state too. So try adding this line before using the any :prefix SPC bindings:

(general-def :states '(normal motion emacs) "SPC" nil)

One warning though. I'm not sure this is something you want to do for evil-emacs-state. What will happen is you wont be able to insert a space whenever you're in emacs state because it will be defined as a prefix key. I don't think this makes much sense considering it's kind of like an insert state.

part of my emacs config with space key

  • Perfect solution for my problem and also made some things clearer to me (Y) – ghhost Jan 25 '18 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.