all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: kill-region without modifying the kill ring
Date: Fri, 25 Sep 2015 11:21:34 -0400	[thread overview]
Message-ID: <barmar-1233EB.11213425092015@88-209-239-213.giganet.hu> (raw)
In-Reply-To: mailman.1805.1443189138.19560.help-gnu-emacs@gnu.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

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


  parent reply	other threads:[~2015-09-25 15:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  8:32 kill-region without modifying the kill ring Jim Newton
2015-09-25 12:15 ` tomas
     [not found] ` <mailman.1800.1443183340.19560.help-gnu-emacs@gnu.org>
2015-09-25 12:47   ` Jim Newton
2015-09-25 12:49   ` Jim Newton
2015-09-25 13:30     ` B. T. Raven
2015-09-25 13:36       ` Jim Newton
2015-09-26 17:57         ` B. T. Raven
2015-09-25 13:51 ` Jorge A. Alfaro-Murillo
2015-09-25 15:15 ` Yuri Khan
     [not found] ` <mailman.1805.1443189138.19560.help-gnu-emacs@gnu.org>
2015-09-25 14:30   ` Jim Newton
2015-09-25 15:47     ` Jorge A. Alfaro-Murillo
2015-09-26  0:41       ` Robert Thorpe
2015-09-25 16:40     ` Michael Heerdegen
2015-09-26  2:27       ` Suvayu Ali
2015-09-26  4:35         ` Michael Heerdegen
2015-09-25 19:13     ` Javier
2015-09-25 15:21   ` Barry Margolin [this message]
2015-09-25 15:37     ` Jorge A. Alfaro-Murillo
     [not found]     ` <mailman.1812.1443195492.19560.help-gnu-emacs@gnu.org>
2015-09-25 16:37       ` Barry Margolin
2015-09-26  2:07 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=barmar-1233EB.11213425092015@88-209-239-213.giganet.hu \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.