help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kill-region without modifying the kill ring


From: Barry Margolin
Subject: Re: kill-region without modifying the kill ring
Date: Fri, 25 Sep 2015 11:21:34 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.1805.1443189138.19560.help-gnu-emacs@gnu.org>,
 jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote:

> Jim Newton writes: 
>  
> > is there a way or an idiom for killing a region without changing 
> > the kill ring. I often want to cut several different regions by 
> > highlighting them, but then insert a particular thing with C-Y. 
> > If I use C-W to kill the region C-Y will yank back the string I 
> > just killed rather than the one I want. 
> > 
> > It would be nice to have a version of C-W which does not effect 
> > the kill-ring. 
>  
> Doesn't selecting the text and using <backspace> do exactly that? 

I just tried it, and C-y recovered the deleted text. So it does put it 
on the kill-ring.

> 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. 

I've used delete-region when I've accidentally run a command in a shell 
buffer that spews out thousands of lines of output. I know I'm not going 
to want it back.

And back in the days of more limited memory, I would also turn off undo, 
so that the deleted region wouldn't be saved in the undo-history.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]