New to Emacs. When I type ", \" is automatically inserted

emacs

Solution

This seems to be an issue with smartparens which prelude installs by default (see the file `prelude-programming.el`. This behavior is described in detail on smartparens wiki. To ensure that smartparens is causing problems you can can do C-h k" this would print about the command acutally run when " is pressed, if the command is `sp--self-insert-command` then the following should work

Paste this `(setq sp-autoescape-string-quote nil)` to your `*scratch*` buffer, go to the closing parenthesis and do C-xC-e, this will disable the behavior for current emacs session.

To disable the behavior for all future emacs session, assuming that you are using prelude, you will need to add the following to your personal config (basically some file inside `/path/to/prelude/personal/`).

(setq sp-autoescape-string-quote nil)

This will disable the auto-escaping of the string quotes, completely. If you like this behavior and do not want to disable it completely you can do what @steckerhalter suggests C-q" will insert just one parenthesis.

If the above does not solve the issue then try providing following info in your question which may help us debug the issue,

1) The list minor modes active (this can be obtained by doing C-hm).

2) Output of C-hk"

Hope that helps

Problem

As the title states, I'm relatively new to Emacs. I tried out several starter kits but went with Prelude and changed a lot of things around. Anyway, I've been getting a good handle on everything...until this morning I was working and I typed double-quotes. Normally Emacs would insert a second double quotes right after ("") due to the auto-completion, but I must have accidentally changed something with a keystroke and now when I type ", I get \"\". Thoughts? Thank you.

Original source