all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <yw.86wp9qpy8a.fsf_-_@zoho.com> (raw)
In-Reply-To: yw.861sryrdjf.fsf@zoho.com

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




  reply	other threads:[~2017-05-09  2:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 14:14 How to delete all text from beginning of buffer to mark Angus Comber
2017-05-08 14:20 ` Loris Bennett
2017-05-08 15:21   ` tomas
2017-05-08 15:43     ` hector
2017-05-08 15:35 ` Teemu Likonen
2017-05-08 15:50 ` Yuri Khan
2017-05-09  2:04   ` Emanuel Berg
2017-05-09  2:20     ` Emanuel Berg [this message]
2017-05-09  3:07     ` Kaushal Modi
2017-05-09  6:53       ` Emanuel Berg
2017-05-09 11:39 ` Magnus Therning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw.86wp9qpy8a.fsf_-_@zoho.com \
    --to=moasen@zoho.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.