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

Reorganize evil-repeat and other evil things #151

Merged
merged 10 commits into from
Feb 15, 2025

Conversation

countvajhula
Copy link
Collaborator

@countvajhula countvajhula commented Feb 15, 2025

Summary of Changes

Symex is coupled to evil in a few different ways:

  • for "repeat command" (i.e. .) functionality
  • for undo/redo (u/C-r), search forward/backward (/, #, etc.)
  • an evil state, used for UI feedback (e.g., in the mode line), and also used for "counts" support in symex commands
  • in the implementation of symex features (just because it was easy to do that at the time -- no special reason)

This PR reorganizes and moves things to disentangle Symex and Evil a bit, so that it should be easier to remove Evil (or reduce our reliance on it). FYI @devcarbon-com

Basically, this PR moves the first item above (i.e., evil-repeat) into a dedicated module to hold evil-related things. The second is moved to user config (explained in the README), and the third (the evil state) is moved into Rigpa (and counts are now supported directly in the lithium mode --- it was easy, just needed to bind the numbers to the digit-argument command 🤷 ). It doesn't address the fourth (evil in the implementation) at all.

So evil in the implementation and evil-repeat are the main things to address now (they have always been, but now the other noise may be more out of the way). I'm not sure how easy it would be to remove evil-repeat, and whether we would need to provide an alternative implementation if we do remove it? There might still be some other annoying uses of Evil here and there, I'm not totally sure. But hopefully it won't be too thorny to remove them (noting these in case you're planning to give it a go @devcarbon-com 🙂 ).

Public Domain Dedication

  • In contributing, I relinquish any copyright claims on my contribution and freely release it into the public domain in the simple hope that it will provide value.

(Why: The freely released, copyright-free work in this repository represents an investment in a better way of doing things called attribution-based economics. Attribution-based economics is based on the simple idea that we gain more by giving more, not by holding on to things that, truly, we could only create because we, in our turn, received from others. As it turns out, an economic system based on attribution -- where those who give more are more empowered -- is significantly more efficient than capitalism while also being stable and fair (unlike capitalism, on both counts), giving it transformative power to elevate the human condition and address the problems that face us today along with a host of others that have been intractable since the beginning. You can help make this a reality by releasing your work in the same way -- freely into the public domain in the simple hope of providing value. Learn more about attribution-based economics at drym.org, tell your friends, do your part.)

This will allow us to treat it uniformly with other commands.
`paredit-raise-sexp` raises an error in this case.
This simplifies things so that symex commands (even user-defined ones)
are repeatable without needing to separately register them for
repetition.
counts don't seem to be working anyway ¯\_(ツ)_/¯
This could potentially be incorporated into lithium for all modes, so
that we don't have to do it for each mode specifically, as it seems
generally desirable for a modal interface.
We will need to find alternatives to these, or perhaps leave it to
users to bind these in .emacs.d config.
Move some evil-related things (esp. evil-repeat code) into a dedicated
evil module. Also, move the actual evil state and its management into
Rigpa, which already manages evil states for other lithium modes.
@countvajhula countvajhula merged commit 9e9428f into drym-org:2.0-integration Feb 15, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant