deb0ch / emacs-winum

Window numbers for Emacs - Navigate windows and frames using numbers
141 stars 13 forks source link

[Bug] `winum-keymap-prefix` not respected #1

Closed FrancisMurillo closed 7 years ago

FrancisMurillo commented 7 years ago

Hey there,

When I set winum-keymap-prefix after importing winum-mode, the keymap prefix is still set to its default binding.

I see that initializing the keymap is when it is imported, not when it is triggered by mode. My reference for this is how workgroups2 does it.

deb0ch commented 7 years ago

Thanks for reporting ! :champagne:

Indeed I can reproduce, it seems that I need to update minor-mode-map-alist during mode initialization, else changing the prefix would only work if setting winum-keymap-prefix before the require, which is not very optimal.

A fix should be available shortly :smile_cat:

deb0ch commented 7 years ago

Looks like it got automatically closed by my commit message. :smile_cat:

Let me know if that solved it, I will close it then

The problem was a little deeper than I first thought. Using a variable for setting the prefix just couldn't work, and any way of updating the keymap, for instance when entering the mode, would break something or prevent other ways of customizing the bindings.

So after thinking of it for a while, this is the most convenient solution that I could come up with. Let me know if you think that my reasoning is flawed :ear:

deb0ch commented 7 years ago

Let's consider it closed. Don't hesitate to reopen or open another issue in case of a problem.

FrancisMurillo commented 7 years ago

Sorry for responding so long. It's okay now. Thanks.