From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: iterating the kill ring (was: Re: How to delete all text from beginning of buffer to mark) Date: Tue, 09 May 2017 04:20:37 +0200 Message-ID: References: <481f9e2a-475f-4fb6-bb6b-abba56a27c2f@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494296479 23815 195.159.176.226 (9 May 2017 02:21:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 02:21:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 09 04:21:14 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7um2-0005zJ-0b for geh-help-gnu-emacs@m.gmane.org; Tue, 09 May 2017 04:21:14 +0200 Original-Received: from localhost ([::1]:34612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7um4-0007JQ-DX for geh-help-gnu-emacs@m.gmane.org; Mon, 08 May 2017 22:21:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7ule-0007JL-RG for help-gnu-emacs@gnu.org; Mon, 08 May 2017 22:20:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7ulb-00058t-Nv for help-gnu-emacs@gnu.org; Mon, 08 May 2017 22:20:50 -0400 Original-Received: from [195.159.176.226] (port=44044 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7ulb-00058i-HJ for help-gnu-emacs@gnu.org; Mon, 08 May 2017 22:20:47 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d7ulS-0005M4-H9 for help-gnu-emacs@gnu.org; Tue, 09 May 2017 04:20:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:iZaqnxRHDYGpAY8G8l0b8oDHP04= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112969 Archived-At: Emanuel Berg wrote: > Won't that fill up the kill ring with stuff > you won't need? Yes, but once you learn how > to iterate the kill ring back and forth, that > doesn't matter. How do people do this? I have: (defun yank-pop-back (&optional arg) (interactive "*p") (yank-pop (if arg (* arg -1) -1)) ) With `yank' at C-y, `yank-pop' at M-y, and then the "yank-pop-back" above as C-M-y, it is very easy to yank and then iterate back and forth. The elaborate stuff with ARG isn't needed to use with the setup I just described. However remove it, it won't work iterating back and forth! (error "Previous command was not a yank") in yank-pop Must be an interface mismatch? Hey, if it works, don't fix it, right :) -- underground experts united http://user.it.uu.se/~embe8573