evil-cleverparens
evil-cleverparens copied to clipboard
x/X causes "Wrong type argument: char-or-string-p, nil"
Any time I press x
or X
(bound to evil-cp-delete-char-or-splice
/evil-cp-delete-char-or-splice-backwards
, respectively). I get the error "Wrong type argument: char-or-string-p, nil".
I'm using evil-cleverparens with clojure-mode/cider/smartparens-config. This is likely an interaction with some other configuration of mine, however the problem only occurs when evil-cleverparens is enabled, not with any of the other modes alone.
Any tips on how to debug this would be appreciated!
You could use edebug
on the splicing forms in evil-cleverparens
to see at what point the error gets thrown. Sorry I don't have much time to spend on this project atm, so I can't offer more help than that.
I get this error when select-enable-clipboard
is non-nil.
Reported error gets thrown here
(defun evil-cp--balanced-block-p (beg end)
"Checks whether the block defined by BEG and END contains
balanced parentheses."
(let ((region (evil-yank-rectangle beg end)))
(with-temp-buffer
(insert region) ;; <-- ERROR, region is nil
(sp-region-ok-p (point-min) (point-max)))))
evil-yank-rectangle
does not seem to be returning anything (anymore), it just yanks into the ?0
register.
Seems to be fixed by https://github.com/emacs-evil/evil/commit/6dbb2d82c5e8d8a5c934ce7a9f93e3f8eff51665