You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded smartparens this morning to the latest version and now it's throwing Unbalanced region error when I try to delete a region using sp-kill-region. I can reproduce this in python
mode and C++ mode.
I cannot seem to figure out what exactly causes this but it seems to mostly happen whenever the region contains a delimiter. For example in python, when I a file with:
x=1
with a new line at the end, I can select the line and delete it. But when I select the new line as well, it says Unbalanced region. I can replicate this pretty consistently.
In C++, this manifests with newline along with the ; delimiter. So this region when selected cannot be deleted:
int x = y;
but not selecting the ; will allow you to kill it. This is a pretty bad bug since new lines and ; are not paired delimiters and should be deleted. I'm not sure what other characters are causing this.
If this can't be fixed soon, is it possible to roll back to an older version using melpa? This makes smartparens unusable and I rely heavily on it. Thanks!
Expected behavior
To be able to kill-region.
Actual behavior
Throws Unbalanced region error.
Steps to reproduce the problem
See above.
Backtraces if necessary (M-x toggle-debug-on-error)
I turned this on but nothing happens apart from the Unbalanced region error message.
Melpa does not serve more than one version, it has been discussed a lot and there is some plan to change it, but it will most likely never get implemented because nobody cares that much (well, I do but I don't have the capacity, just as the other contributors I suppose).
I would very much recommend to use melpa stable at least for smartparens. We have tests and our coverage is very very good concerning the scope of the project but sometimes things slip by. The error you are experiencing most likely originated from the patch I've submitted yesterday :/
I have a patch for the cases you've reported so I'm closing this issue. If you find more broken cases please report back! Thanks for your feedback, it came pretty damn fast so hopefully not many people were affected.
I upgraded smartparens this morning to the latest version and now it's throwing
Unbalanced region
error when I try to delete a region usingsp-kill-region
. I can reproduce this in pythonmode and C++ mode.
I cannot seem to figure out what exactly causes this but it seems to mostly happen whenever the region contains a delimiter. For example in python, when I a file with:
with a new line at the end, I can select the line and delete it. But when I select the new line as well, it says Unbalanced region. I can replicate this pretty consistently.
In C++, this manifests with newline along with the
;
delimiter. So this region when selected cannot be deleted:int x = y;
but not selecting the
;
will allow you to kill it. This is a pretty bad bug since new lines and;
are not paired delimiters and should be deleted. I'm not sure what other characters are causing this.If this can't be fixed soon, is it possible to roll back to an older version using melpa? This makes smartparens unusable and I rely heavily on it. Thanks!
Expected behavior
To be able to kill-region.
Actual behavior
Throws
Unbalanced region
error.Steps to reproduce the problem
See above.
Backtraces if necessary (
M-x toggle-debug-on-error
)I turned this on but nothing happens apart from the Unbalanced region error message.
Environment & version information
smartparens
version: latest (20170716.1328)M-x emacs-version
):The text was updated successfully, but these errors were encountered: