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.83k stars 194 forks source link

undesired paren completion in org mode. #831

Open introom opened 6 years ago

introom commented 6 years ago

In org mode, press the following key stroke:

=a<del>x=y

Expected behavior

the text should be: =x=y

specifically, the second = should skip over the completed = instead of inserting a new =

Actual behavior

=x=y=

Steps to reproduce the problem

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

Environment & version information

In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.

Fuco1 commented 6 years ago

I get the expected behaviour with my setup so I think this is configurable somehow. Which means we should probably make it the default as it is indeed what the user would expect.

Do you have smartparens-org loaded? Try (require 'smartparens-org) to be sure and try again

Also, do you have smartparens-strict-mode enabled or not?

introom commented 6 years ago

hi. thanks for your quick reply.

I've enabled smartparens-org, which is automatically loaded when I open an org file.

I've enabled/disabled smartparens-strict-mode, which gives the same undesired behavior.

Fuco1 commented 6 years ago

Oh, the github formatting messed up the first line in your report, it did not print the <del> part (I guess when you don't put it in the pre mode it thinks it's a html tag and strips it). I can reproduce the issue when I hit backspace.

I still think this should be configurable somehow, but I'm not sure how yet.

introom commented 6 years ago

yes. it's like, if the key to type is the ending paren, in the meantime the cursor is on the end of a pair, then just skip.

Fuco1 commented 6 years ago

That's what happens for ) and friends in strict mode and also for the " which is why I'm quite puzzled why it shouldn't work for =.