emacs-evil / evil-surround

you will be surrounded (surround.vim for evil, the extensible vi layer)
Other
627 stars 60 forks source link

change / delete surround delimiters stopped working with evil-cp-change / evil-cp-delete #204

Closed practicalli-johnny closed 1 year ago

practicalli-johnny commented 1 year ago

A change on or after 27th June 2023 to the evil-surround package causes change surround and delete surround to fail with the following message

evil-motion-range: No surrounding delimiters found

I'm assuming either evil-surround has change or evil itself has change the way it calls evil-cp-change or `evil-cp-delete.

Both commands work with a Melpa package build evil-surround-20230627.2052 containing the evil-surround.el file with a timestamp of 17 August 2023 at 11.23 UTC

First discovered in Spacemacs and reported here: https://github.com/syl20bnr/spacemacs/issues/16144

tomdl89 commented 1 year ago

Thanks for the bug report @practicalli-john - I'll take a look as soon as I have some time.

tomdl89 commented 1 year ago

I think I have fixed the problem of opening parens ( not finding parens when not padded with whitespace. There's also a problem of over-deleting when evil-cleverparens is enabled, which this issue may hint at, but as it doesn't explicitly mention it, I'll let it remain closed, although I'll continue looking at that problem. @practicalli-john if you have a chance to test this fix, please let me know if it works, and if there are other problems in this area (other than the over-deletion that I mentioned). Thanks!

practicalli-johnny commented 1 year ago

All looks good now to me.

I updated the recipe to use the latest commit and restarted Emacs. I assume Melpa will pick up the new commits in the current build that should finish in the next two hours and the recipe will not longer be required.

(evil-surround
  :location
  (recipe :fetcher github
          :repo "emacs-evil/evil-surround"
          :commit "0d860be74165ceb8314742e4191cdad693f40a6d"))
tomdl89 commented 1 year ago

The "over-deletion" problem is fixed in bd98f7f5492446885dc4c6b0a7579c75c22ac829