23

Possible Duplicate:
Emacs: how to delete text without kill ring?

I am sick of everything i 'delete' in emacs being added to the kill-ring; it always means i must M-y twice to move past what i just deleted to get what i was going to paste!

is there an easy way to actually 'delete' what i select rather than add it to the kill-ring? How do other people deal with this problem? doesn't it annoy you too that what you 'delete' is added to the kill-ring?

Community
  • 1
  • 1
horseyguy
  • 29,455
  • 20
  • 103
  • 145
  • 1
    Isn't the first question in the related list an *exact* duplicate - http://stackoverflow.com/questions/637351/emacs-how-to-delete-text-without-kill-ring – dbr Aug 10 '09 at 21:50
  • ah, i see, yes, a mod can feel free to delete this question then :) – horseyguy Aug 10 '09 at 21:54
  • As aside note: you probably just have to split the killring and the clipboard, and bind a work with both to a different keys. E.g. `c-y` to paste from clipboard and `s-y` to paste from kill-ring. See [this answer](http://stackoverflow.com/a/24209883/2388257) and the last comment for details. – Hi-Angel Sep 07 '14 at 09:45

1 Answers1

31

Sure. Whereas C-w by default performs a (kill-region) you could instead perform a (delete-region) — and likewise for kill-whole-line, kill-word, and any other sort of killing you might otherwise have planned.

You could do a delete-region by hitting M-x and then typing it out, though that seems to undo the savings of the extra M-y you have to perform now, so binding the delete- functions to... some keys... of some kind... would probably be preferable.

VoteyDisciple
  • 37,319
  • 5
  • 97
  • 97