[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill-region without modifying the kill ring
From: |
Jim Newton |
Subject: |
Re: kill-region without modifying the kill ring |
Date: |
Fri, 25 Sep 2015 07:30:13 -0700 (PDT) |
User-agent: |
G2/1.0 |
> Doesn't selecting the text and using <backspace> do exactly that?
> By the way, as Tomás suggested, I think that you are better off
> always killing the region and then using M-y. You never know if
> you will actually change your mind and use the text you deleted.
> For an improved version of M-y, try:
>
> https://github.com/browse-kill-ring/browse-kill-ring
The problem, as I described above is that every time I press C-w, then to get
back the text I want to yank, I must press M-y N+1 times.
Here is the sequence. I copy the region I want to insert with M-w, then I
start reading through the text in the buffer, every time I encounter a string I
want to replace with C-y, I have to first delete what's there. So I select the
first using M-space a few times, and press C-w C-y M-y, then continue to the
text I want to remove and replace (maybe the same string again, or maybe one
slightly different), and press M-space (a few times), then C-w C-y M-y M-y,
next time I have to press C-w C-y M-y M-y M-y
The 20th time I need to press
C-w C-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y M-y
M-y M-y
That's why the M-y suggestion does not work.
But the suggestion to use [delete] instead of C-w is a good one. I didn't know
I could delete a region with the delete key, i've used C-w since 1988.
So to answer the original question:
Q: how can I delete a region without effecting the kill-ring
A: delete-forward-char which is bound by default to [delete] (making sure
transient mark mode is active)
Message not available
Re: kill-region without modifying the kill ring, Jorge A. Alfaro-Murillo, 2015/09/25
Message not available
Re: kill-region without modifying the kill ring, Javier, 2015/09/25
Re: kill-region without modifying the kill ring, Yuri Khan, 2015/09/25
Message not available