From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rock69 Newsgroups: gmane.emacs.help Subject: Re: No copy when killing Date: Sat, 14 Jun 2008 03:18:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0cd27ea8-87cb-4891-8cce-8887be2aa949@e39g2000hsf.googlegroups.com> References: <39fbd280-441d-498e-9a53-ce3188f31398@d77g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1213461051 10586 80.91.229.12 (14 Jun 2008 16:30:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Jun 2008 16:30:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 14 18:31:35 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K7Yf7-0003sA-Ob for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Jun 2008 18:31:34 +0200 Original-Received: from localhost ([127.0.0.1]:41833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7YeJ-0005ar-L7 for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Jun 2008 12:30:43 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e39g2000hsf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: 151.53.42.68 Original-X-Trace: posting.google.com 1213438715 13025 127.0.0.1 (14 Jun 2008 10:18:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 14 Jun 2008 10:18:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e39g2000hsf.googlegroups.com; posting-host=151.53.42.68; posting-account=oEKbfAoAAADQ6fiSE74ec-bF1nZx2Kc_ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/8.04 (hardy) Firefox/2.0.0.14, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159464 X-Mailman-Approved-At: Sat, 14 Jun 2008 12:22:51 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54834 Archived-At: On Jun 14, 11:54 am, Xah wrote: > On Jun 14, 2:24 am, rock69 wrote: > > > Is there some way to disable copying to the clipboard when deleting > > something (ex. with M-d or C-k)? I'm asking this because I often find > > myself copying something and then deleting successive lines, and when > > I have to paste what I had previously copied, it's really annoying to > > have to scroll through with C-y M-y. > > i doubt there's a buildin customization to let you set that pref. > > You might need to write your own function to do delete text without > putting things in ring. (the elisp would be trivial... pls ask if you > want the code) > > ------------------------- > > however, what you want is prob best done by using emacs's so-called > =E2=80=9Cregister=E2=80=9D, which basically allow you to have multiple cli= pborads. > > select a region, then do M-x copy-to-register (C-x r x). Then type 1 > (as the name of your register) > To paste that, type M-x insert-register (C-x r g), then type 1. > > You can of course bind these to shortcuts with a simple elisp, so > that, for example, M-1 copy region to clipboard 1, M-S-1 paste it from > clipboard 1. Similar for 2, 3, etc. > > ------------------------- > > ... i've been thinking whether emacs behavior of M-d, C-k etc > automatically put things into kill-ring is a efficient mode of > operation, as opposed to not have these operations auto put into kill- > ring and only copy/cut (M-w,C-w) does. But just never spent the time > to seriously think about this. > > I'm used to the emacs way anyhow for 10 years and didn't find any prob > with it. However, this doesn't imply this emacs way is more > efficient... just habit. (of course, emacs old timers are likely to > say it's that way because decades of hacker usage find it to be > efficient and blab blab... which often has no scientific basis > whatsoever and in fact some of emacs ways, such as its default > keybindings and its undo behavior, are very operatively inefficient.) > > Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84 Thank you Xah for the detailed explanation. I would indeed like to see the code if it's not too much trouble. Although, as a matter of fact, I most likely am going to follow your suggestion, and use another register when I'm in one of the situations I mentioned. Thanks again so much :)