When editing text, editors' usual behaviour is to replace selected text with the next text. In Emacs, when text is selected and you enter new characters, the new text gets inserted at point, leaving the current selection intact.

How to get Emacs to delete selected text when typing new characters?


1 Answer 1


Just add this line in your init file:

(delete-selection-mode 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.