From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Newton Newsgroups: gmane.emacs.help Subject: Re: kill-region without modifying the kill ring Date: Fri, 25 Sep 2015 07:30:13 -0700 (PDT) Message-ID: <7a656389-cff3-4afd-a237-1142a1ba7daa@googlegroups.com> References: <8272bab2-aa15-479f-b838-0b60fb11c5bb@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1443192100 28280 80.91.229.3 (25 Sep 2015 14:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 14:41:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 16:41:35 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZfUBj-0001PD-5I for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 16:41:27 +0200 Original-Received: from localhost ([::1]:43993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfUBi-0007dp-Hy for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 10:41:26 -0400 X-Received: by 10.182.213.73 with SMTP id nq9mr5068578obc.33.1443191414405; Fri, 25 Sep 2015 07:30:14 -0700 (PDT) X-Received: by 10.50.117.4 with SMTP id ka4mr27487igb.6.1443191414369; Fri, 25 Sep 2015 07:30:14 -0700 (PDT) Original-Path: usenet.stanford.edu!kq10no9669329igb.0!news-out.google.com!z4ni1774ign.0!nntp.google.com!kq10no9669322igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=163.5.55.13; posting-account=p_cn_woAAAAXPGEq7uizWAc60TPLf8y5 Original-NNTP-Posting-Host: 163.5.55.13 User-Agent: G2/1.0 Injection-Date: Fri, 25 Sep 2015 14:30:14 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:215057 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107341 Archived-At: > Doesn't selecting the text and using do exactly that?=20 > By the way, as Tom=E1s suggested, I think that you are better off=20 > always killing the region and then using M-y. You never know if=20 > you will actually change your mind and use the text you deleted.=20 > For an improved version of M-y, try: > =20 > 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 g= et 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 str= ing 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 con= tinue 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.= =20 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)