Description
Hi there,
Thanks for maintaining this great package! I love sunrise commander, and I'm trying to add support for it in evil-collection so that it's easier for evil users to use, but my initial attempts didn't work, and I think it has something to do with the behavior of the major mode hook. To dig into it more I tried the following test, and I'd love some help understanding what's going on.
I added the following function to what appears to be SC's major mode hook:
(add-hook 'sr-mode-hook #'evil-normal-state)
In theory this should make it so that whenever you enter sunrise commander, it should be in evil normal state. But this isn't what happens - it starts in Emacs state. This is odd because usually it starts in Normal state for any fresh buffer if evil mode is enabled, and it doesn't need a special hook. So I'm not sure why it wouldn't work even with the hook. I also tried with just a simple hook function that prints a message, and I do see the message appear in the Messages buffer, so it seems that the hook does get triggered at some point in the lifecycle of the buffer.
Once SC has started up, if I hit Esc to enter Normal state, it works (this works regardless of whether the hook above is in place or not). But each time I enter a new folder, it creates a fresh buffer in sr-mode, and this once again starts in Emacs state rather than Normal state and I need to hit Esc each time to get into Normal state.
I'd like to understand (1) why it doesn't start in Normal state even though evil-mode is enabled, (2) why using the major mode hook doesn't work.
I suspect the answers to these questions will illuminate the original issue I encountered with adding support for SC in evil-collection.
Any help in understanding this would be appreciated. Thanks!