Questions tagged [delete-selection-mode]

12 questions
6
votes
3 answers

delete-selection-mode not a default?

If you enable Delete Selection mode, a minor mode, then inserting text while the mark is active causes the selected text to be deleted first. This also deactivates the mark. Many graphical applications follow this convention, but Emacs does…
m33lky
  • 297
  • 3
  • 9
6
votes
1 answer

delete-selection-mode and $

Using Aquamacs 3.2 on Mac OSX Yosemite. I run with delete-selection-mode set, and it mostly works as advertised. However, if I'm in TeX mode (AucTeX), make a selection, and then type $, the selection is cleared and the $ appended. So for example if…
rogerl
  • 205
  • 4
  • 9
5
votes
1 answer

How to make sure currently selected text gets deleted when typing new text?

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…
3
votes
0 answers

smartparen-latex with delete-selection-mode

In my emacs setup, if I have smartparens-mode enabled with smartparens-latex and I open a latex document, type some text then select it and type any latex special command (such as $, ", \{, etc...) the text gets surrounded by these symbols as…
Tohiko
  • 1,589
  • 1
  • 10
  • 22
3
votes
3 answers

Replace selected text on [shift insert] is broken in emacs 25.1

I updated to 25.1 and found that copy/paste works differently. For example when I select a word "visit" and try to replace this word with [shift insert], text in clipboard is inserted in the beginning of the selection, instead of replacing it. When…
Stepan S
  • 65
  • 11
3
votes
0 answers

Overwrite selected text

Previously when I selected text and type something or insert from buffer, the selected text would get overwritten. Now it gets appended, apparently I've change some setting. What is it?
Oskar K.
  • 278
  • 1
  • 7
1
vote
1 answer

Delete Selection Mode - Enter

How can I have delete-selection-mode work when I press Enter (RET) in Org mode? I can always just delete the selection and then use RET, but I'm having a hard time working this into my muscle memory. Current behavior: I select the text I want to…
1
vote
2 answers

What's the most efficient, idiomatic way to paste-and-replace in Emacs?

I often do something like this: Copy some stuff Go to where I need to paste it Paste it (C-y) Kill the rest of the line (C-k) Select what I just pasted, and copy it again Repeat steps 2-5 The whole "re-select what I just pasted" thing is not…
0
votes
1 answer

How to bring the deleted region back if I abort yanking with `M-y`?

I have the following configuration in my init.el: (use-package delsel :demand t :config (delete-selection-mode +1)) When I do yank-pop with M-y while a region is selected, it deletes the selected region, but if I abort the process with C-g, it…
0
votes
2 answers

How to add a hook to save things on kill-ring (or clipboard ring) before a frame is deleted?

Context: I have been using an interesting software called Emacs Anywhere. It helps me bring emacs keybindings for stuff like this (editing text for a question on Stack Exchange). Overall, the software has been working well! This is an illustration…
Pedro Delfino
  • 1,369
  • 3
  • 13
0
votes
0 answers

Undo insertion and deletion in one step when undoing overwrite of selection

Undoing the insertion of a character while the region is active (and delete-selection-mode is non-nil) requires two steps: the first to undo the insertion and the second to restore the deleted region. Is it possible to undo both steps with a single…
Arch Stanton
  • 1,525
  • 9
  • 22
0
votes
1 answer

Unable to deactivate the selection mode with C-SPC

Sometimes I can't deactivate the mode of selecting text which is C-SPC. Even if I press it a second time and move the cursor, the text still gets selected. I press C-SPC one more time, it activates and selects the text as I move the cursor. Then if…
Oskar K.
  • 278
  • 1
  • 7