Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.81k stars 193 forks source link

Smartparens strict mode breaks rectangle kill #909

Open raxod502 opened 6 years ago

raxod502 commented 6 years ago

Expected behavior

When I select a rectangular region with C-x SPC, and then try to kill it, Smartparens complains about an unbalanced region. However, using M-0 C-w to override it, should avoid the problem.

Actual behavior

When I use M-0 C-w, a regular deletion is performed, not a rectangular one.

Steps to reproduce the problem

Load Smartparens into emacs -Q. Enable smartparens-strict-mode. Insert:

(foo
 bar
 baz)

Use C-x SPC to select the following rectangle:

(

Press C-w. Smartparens complains. Now press M-0 C-w. The result should be:

foo
bar
 baz)

Instead, however, it is:

bar
 baz)

Environment & version information

Fuco1 commented 6 years ago

Works for me on 25.2.

raxod502 commented 6 years ago

Doesn't work for me on 25.3. You get

foo
bar
 baz)

?

raxod502 commented 6 years ago

Also doesn't work for me on 25.2. There must be some other difference. Here are the exact revisions of all packages I used to reproduce the bug:

(("dash.el" . "a74f4cfcdc8d0642a9f602ad494f0354f27dacc9")
 ("elpa" . "6d67ebe7f958426d34019cd3a901ff4654a357d7")
 ("epkgs" . "59ca0b0ae4b09d45579232ed4e729d514ab49747")
 ("melpa" . "2304869fc297723b84505b8a80d6d05854ea69c4")
 ("smartparens" . "b8fdee3fa66a8a8bef973ec302072aa14e13a3ec")
 ("straight.el" . "adce2699a6b6d56d53b33064b350687c0ba28973"))
Fuco1 commented 6 years ago

Yea, I get

foo
bar
 baz)

I'll look into this, it sounds pretty weird :)

Fuco1 commented 6 years ago

But I never did anything special for rectangle mode so things might not work as expected. I didn't even know it existed, in fact :D