syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.57k stars 4.9k forks source link

evil-surround: change / delete delimiters fails #16144

Closed practicalli-johnny closed 10 months ago

practicalli-johnny commented 10 months ago

Description :octocat:

Evil change / delete surround no longer working, reporting the following error in the buffer, SPC b m

evil-motion-range: No surrounding delimiters found

Assumption: a change in https://github.com/emacs-evil/evil-surround/ occurred on or after 27th June 2023, as the package evil-surround-20230627.2052 functions correctly. This package contains the evil-surround.el with a timestamp of 17 August 2023.

Upstream: an issue has been raised on the evil-surround repo https://github.com/emacs-evil/evil-surround/issues/204 (where it is assumed the issue resides - although happy to be corrected if this assumption is not right) - UPDATE: new package maintainer is aware of the issue and investigating.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart:

The () parens are not changed and the no surrounding delimiters found message reported in the Emacs buffer.

Expected behaviour: :heart: :smile:

Using d s folowed by ( should remove both parens, ()

Using c s followed by ( and then ] should replace the parens, () with []

System Info :computer:

Backtrace :paw_prints:

<<BACKTRACE IF RELEVANT>>
practicalli-johnny commented 10 months ago

Pinning the evil-surround package to an ealier version is a temporary resolution to the issue.

Edit the Spacemacs user configuration and add a recipe for evil-surround to pin the older version (pinned even during package updates).

Newer versions of evil-surround should be deleted from elpa/<emacs-version>/develop and then Emacs restarted, which should automatically download the package from the recipe

   dotspacemacs-additional-packages '((evil-surround
                                       :location
                                       (recipe :fetcher github
                                               :repo "emacs-evil/evil-surround"
                                               :commit "f273821f575ace519066fb106ee45a5b8577475f")))
practicalli-johnny commented 10 months ago

A fix for the issue has been pushed upstream and Melpa has just started a new build cycle so the updated package should be available within 2 hours.

To test before Melpa finishes the build, use the following recipe

(evil-surround
  :location
  (recipe :fetcher github
          :repo "emacs-evil/evil-surround"
          :commit "0d860be74165ceb8314742e4191cdad693f40a6d"))
practicalli-johnny commented 10 months ago

Melpa package updated with fix.