Closed JoeDupuis closed 8 years ago
Woah. Crazy stuff.
But I cant reproduce it. I created a new buffer in ruby-mode
and input:
"this is a test"
Did the backward selection using M-SPC
after a
then C-M-b
3 times to select back to and including this
. Then backspace. I get "test"
.
Two questions:
It's quite possible that though you think the bug is related to autopair, it has nothing to do with autopair at all. After all, did you expect autopair to do anything special in that situation? Or maybe you're right and it does. Anyway, please providesthe answers to both questions. And also try out electric-pair-mode
if you're using an Emacs >= 24.4.
Thanks.
I will take a look at electric-pair-mode, I am on 24.5.
Autopair is loaded from a elpa package. Here is a video of me reproducing the bug from a emacs started with
emacs -Q
The steps to reproduce from scratch : 1- load autopair.el 2- M-x autopair-mode 3- write "this is a test" and erase backward from the first T in test to the first ".
The autopair come from this package version "20140825.427"
I can reproduce on both my mac and a arch linux desktop.
Reproduced it! It was my config, and not yours, that was somehow preventing this bug from manifesting itself.
In the meantime, take a look at electric-pair-mode
, it's basically autopair 2.0, much better.
So, after spending way more than than I wanted to with this bug, I can say this:
backward-delete-char-untabify
. delete-selection-mode
, a common and useful option, it doesn't happenelectric-pair-mode
.So, while this is well and truly an autopair bug, I'm marking this "wont-fix", sorry.
Thanks for checking it anyway. I'll give electric-pair a try.
Hi, The bug is hard to explained so I made a video/gif to explain: http://imgur.com/iGSln51
Without autopair this works just fine. I tested for incompatibility with other packag e and tried running with a default emacs config with only autopair loaded.
if you erase with backspace (not C-w) a region up to an autopaired symbol
( " ' [
it will insert a ^? and move stuff around.So let's say I create a new buffer
I write in it:
"this is a test"
If I make a backward selection of
this is a
(the same selection forward works) and hit backspace. instead of resulting in:"test"
Like it does with forward selection, it does this instead:test"^?
Check the gif/video to get a better idea. In it I do 3 selection 2 times backward (bug) 1 time forward (works)
Each time I erase with backspace, the bug does not reproduce with C-w
Any clue ?