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.8k stars 193 forks source link

But when replacing marked text with "\" #1048

Open nivaca opened 3 years ago

nivaca commented 3 years ago

Expected behavior

The selected text gets replaced with a "\".

Actual behavior

Smartparens completely changes my text and I cannot undo the changes.

Steps to reproduce the problem

In latex-mode, select a piece of text within curly braces. Type "\".

Please see screencast here: https://imgur.com/W8djB90

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information

Also occurs on GNU Emacs 28.

Also happens on Mac:

myparent.el.txt

ddoherty03 commented 3 years ago

I second this bug report. It also happens with quotes when a region is active. Using ubuntu 20.04 linux.

Fuco1 commented 3 years ago

I can reproduce this but for me it only happens if I also select an empty space in front of the word, otherwise it just erases the word and does nothing (not even inserting \)

pietvo commented 3 years ago

I have the same problem with Emacs 28 on MacOS High Sierra. This is very annoying as undo will not work properly in this case, so I have to remember the original text or find an old version of the file.

Fuco1 commented 3 months ago

I can no longer reproduce this bug.

temyurchenko commented 1 month ago

I can still reproduce this bug (calling "\" on a region just deletes the region). It should be solved with the new AUCTeX version and #1208 merged in.