emacs-evil / evil-surround

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

Unexpected interaction with evil-embrace on Doom Emacs #212

Open countvajhula opened 4 days ago

countvajhula commented 4 days ago

Hi there, I'm bringing this issue to your attention that was reported on the Symex repo, in case you feel a fix is warranted in evil-surround. It appears that Doom Emacs enables some advice by default that leads to unexpected interaction between evil-surround and evil-embrace.

I personally am not experiencing this issue but it seems that it affects (all?) Doom Emacs users.

Reproducing it:

(f1 |(x1 x2))

M-: (evil-surround-change (following-char))

Causes:

Debugger entered--Lisp error: (error "No surrounding delimiters found")
  error("No surrounding delimiters found")
  evil-select-paren("( " " )" 1847 1847 nil 1 t)
  evil-surround-outer-overlay(("( " . " )") 40)
  evil-embrace-evil-surround-change(40)
  apply(evil-embrace-evil-surround-change 40)
  evil-surround-change(40)
  eval-expression((evil-surround-change (following-char)) nil nil 127)
  funcall-interactively(eval-expression (evil-surround-change (following-char)) nil nil 127)
  command-execute(eval-expression)

for affected users.

countvajhula commented 4 days ago

Looks like there is an existing issue on evil-embrace that may be connected: https://github.com/cute-jumper/evil-embrace.el/issues/12