For example, in Lisp tower, we set symex to be the default mode. Yet, opening Lisp buffers does not set Symex as the initial mode.
We set the Lisp tower in all Lisp buffers via major mode hook in rigpa--provide-editing-structures -- this is working correctly, so a simple fix seemed to be to just also enter the default mode for the tower in the same hook function. But this does not fix the issue. It seemed that with this change, it does enter Symex, and then later enters Normal again for some reason.
From initial debugging via edebug, it looked like evil-symex-state-entry-hook was being called, but the value of the evil-state variable within the hook function (e.g. a new rigpa--enter-default-mode function) was normal rather than symex. This seems weird, but if this is actually the case, it could be worth trying to reproduce this using a dummy evil state -- that is, define an evil state, evil-dummy-state, add a function to evil-dummy-state-entry-hook, and see whether evil-state within that function is dummy or normal, and whether we can reproduce a case where it's mismatched.
Workaround, place this in your Emacs config:
(advice-add 'find-file
:after
(lambda (&rest _args)
(when (= rigpa--current-tower-index 2)
(setq rigpa--current-level 1)
(rigpa--enter-level rigpa--current-level))))
Reported by @IQubic
For example, in Lisp tower, we set
symexto be the default mode. Yet, opening Lisp buffers does not set Symex as the initial mode.We set the Lisp tower in all Lisp buffers via major mode hook in
rigpa--provide-editing-structures-- this is working correctly, so a simple fix seemed to be to just also enter the default mode for the tower in the same hook function. But this does not fix the issue. It seemed that with this change, it does enter Symex, and then later enters Normal again for some reason.From initial debugging via edebug, it looked like
evil-symex-state-entry-hookwas being called, but the value of theevil-statevariable within the hook function (e.g. a newrigpa--enter-default-modefunction) wasnormalrather thansymex. This seems weird, but if this is actually the case, it could be worth trying to reproduce this using a dummy evil state -- that is, define an evil state,evil-dummy-state, add a function toevil-dummy-state-entry-hook, and see whetherevil-statewithin that function isdummyornormal, and whether we can reproduce a case where it's mismatched.Workaround, place this in your Emacs config:
Reported by @IQubic