noctuid / general.el

More convenient key definitions in emacs
GNU General Public License v3.0
1k stars 44 forks source link

Key sequence starts with non-prefix key. #492

Closed apoorv569 closed 3 years ago

apoorv569 commented 3 years ago

I am having a problem with general.el package. I have SPC set as a prefix and then other keys as sub-prefix, then some other keys as actions, like how Doom Emacs has.

(nvmap :states '(normal visual) :keymaps 'override :prefix "SPC"
  "SPC"   '(find-file :which-key "Find file")
  .
  .
  .
  "m"       '(:ignore t :which-key "Org")

All this works.. But when I add this line,

"m i"     '(:ignore t :which-key "Insert")
"m i i"   '(org-insert-item :which-key "Org insert item")) 

It gives error saying,

"Key sequence SPC m i i starts with non-prefix key SPC m i"

I basically want SPC m to be a preifx for Org related actions, then i for Org insert related actions.

noctuid commented 3 years ago

Have you bound SPC m i somewhere else? What does C-h k SPC m i i show?

apoorv569 commented 3 years ago

Have you bound SPC m i somewhere else? What does C-h k SPC m i i show?

Ah! Yes, it was already bound to something else, I forgot to unbind it. I set it to :nil first, then changed to :ignore. Now its working.

Thanks!

Will close this now.