From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: Kill ring leak in winemacs macros Date: Wed, 03 Aug 2005 09:52:16 -0600 Message-ID: References: <7543E4D41F4D2244B8FC369049A7869701E6113B@hqmsg01.mcdonaldbradley.local> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123084977 9732 80.91.229.2 (3 Aug 2005 16:02:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2005 16:02:57 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 18:02:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E0LgJ-0003Ui-9Q for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2005 18:01:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0Lj4-00069U-7I for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2005 12:04:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E0Lfd-0003zU-Ks for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2005 12:00:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E0LfT-0003wK-8h for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2005 12:00:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0LfQ-0003q6-UU for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2005 12:00:29 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E0LmP-0006Ji-7q for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2005 12:07:41 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E0LZZ-0002Me-A5 for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2005 17:54:25 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Aug 2005 17:54:25 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Aug 2005 17:54:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <7543E4D41F4D2244B8FC369049A7869701E6113B@hqmsg01.mcdonaldbradley.local> X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:12638 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:12638 Peterson, Eric wrote: > When I create a keyboard macro in which I kill and yank form the EMACS > kill ring and infinitely apply the macro via the "0" prefix argument, I > have to make sure and not copy or kill into the Windows kill ring while > the macro is running. Otherwise this inadvertently introduces > unwanted/unexpected data into the EMACS kill ring. My macros can run > for a long time on large files, so this can stop me from doing other > work while I am waiting. Or I can forget about the danger and corrupt > the data I am manipulating. ... > I couldn't find a version of or argument for EMACS "kill-line" or > "kill-ring-save" that would help me. I'm hoping for a solution that > wouldn't require me to code and manipulation of > "interprogram-cut-function" seemed to require codeing. Anything you put in your ~/.emacs file is Lisp, so that's coding -- but you can use the M-x customize interface to do it for you. I don't think your problem is with interprogram-cut-function, since that just causes the killed text in Emacs to be propagated to the window system's cut buffer. I think your problem is actually with interprogram-paste-function, which gets the text to be yanked in Emacs from the window system's cut buffer instead of from the kill ring. If you don't ever want Emacs to yank from the window system's cut buffer: (setq interprogram-paste-function nil) If you just want to make sure Emacs yanks from its kill ring when calling a keyboard macro: (defadvice call-last-kbd-macro (around yank-from-kill-ring activate) "Yank text from the kill ring, ignoring the window system's cut buffer." (let ((interprogram-paste-function nil)) ad-do-it)) -- Kevin Rodgers