From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bramadams Newsgroups: gmane.emacs.help Subject: Re: Move yanked entry to front of kill ring instead of other way around Date: Mon, 26 Nov 2007 08:17:12 -0800 (PST) Organization: http://groups.google.com Message-ID: <5b0819e7-b752-4d93-ab4d-b7ccfddfaf3b@e6g2000prf.googlegroups.com> References: <3252530c-264f-4a07-b129-bc539ca6344a@i12g2000prf.googlegroups.com> <35e81a0c-c827-41b7-bbfe-7395ef5ec900@s36g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196095249 5949 80.91.229.12 (26 Nov 2007 16:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 16:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 26 17:40:55 2007 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 1Iwh0l-0001wh-KD for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 17:40:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iwh0W-00024U-JR for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 11:40:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e6g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: 157.193.92.81 Original-X-Trace: posting.google.com 1196093832 29696 127.0.0.1 (26 Nov 2007 16:17:12 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 26 Nov 2007 16:17:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e6g2000prf.googlegroups.com; posting-host=157.193.92.81; posting-account=PX70RgoAAAAnT9iDAzkH2mvkolcc5uEk User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9,gzip(gfe),gzip(gfe) Content-Disposition: inline Original-Xref: shelby.stanford.edu gnu.emacs.help:154114 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:49546 Archived-At: Hi, On 22 nov, 17:34, bramadams wrote: > However, I wonder whether there is also some solution where the most > recently yanked entry is physically transferred to the front of the > ring instead of the other way around. Of course, in that case the ring > is not really a pure ring anymore... I've been browsing a bit through the elisp manual (http://www.gnu.org/ software/emacs/manual/html_node/elisp/The-Kill-Ring.html#The-Kill- Ring), and the behaviour above apparently is not that easy to obtain. Advising functions would be the way to go, but there may be some problems with the interplay between yanking and undoing. Suppose the ring contains ("a" "b" "c") with "a" as the oldest entry. If one presses C-y followed by M-y, one should not immediately move the resulting "b" to the front of the kill ring, as there could be other M-y or C-_ invocations before the current yank process ends, i.e. the actual desired data is found. Then, the ring's front should move back to its original position, with the yanked data moved to the front (if needed). Did anyone ever try to pursue something similar, i.e. change the current kill ring behaviour? Kind regards, Bram Adams