Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default mode for tower is not honored #21

Open
countvajhula opened this issue Jul 31, 2024 · 0 comments
Open

Default mode for tower is not honored #21

countvajhula opened this issue Jul 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@countvajhula
Copy link
Owner

countvajhula commented Jul 31, 2024

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

@countvajhula countvajhula added the bug Something isn't working label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant