all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Deniz Dogan <deniz@dogan.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Repeat count for yanking
Date: Thu, 21 Jul 2011 23:41:28 +0200	[thread overview]
Message-ID: <4E289D08.1030007@dogan.se> (raw)
In-Reply-To: <871uxjb9e9.fsf@dod.no>

On 2011-07-21 23:39, Steinar Bang wrote:
>>>>>> pmlists@free.fr (Peter Münster):
>
>> You can put the yank into a keyboard macro and use the prefix argument
>> to call the macro 100 times.
>
> That would be `C-x ( C-y C-x )' to define the macro (and as a side
> effect do a single yank), and then `C-u 99 C-x e' to execute the macro
> 99 times (to get the remaining 99 yanks).
>
> It's less effort than you might think, since creating a keyboard macro
> for a repetitive task, is something you do frequently once you've
> discovered it (at least I did).
>

I advised `yank' so that C-u 100 C-y yanks 100 times instead (which is 
much more useful in my opinion):

(defadvice yank (around damd-yank first nil activate)
   "If ARG is neither nil nor \\[universal-argument], yank ARG times.
Otherwise, use the original definition of `yank'."
   (if (or (not arg)
           (consp arg))
       ad-do-it
     (dotimes (i arg)
       (yank))))

Deniz



  reply	other threads:[~2011-07-21 21:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  9:35 Repeat count for yanking C K Kashyap
2011-07-05 11:13 ` Peter Münster
2011-07-21 21:39   ` Steinar Bang
2011-07-21 21:41     ` Deniz Dogan [this message]
2011-07-05 11:46 ` Richard Riley
2011-07-05 12:38   ` Perry Smith
2011-07-05 12:44     ` Thierry Volpiatto
2011-07-05 13:42       ` Teemu Likonen
2011-07-06  6:26         ` C K Kashyap
2011-07-05 17:09       ` Richard Riley
2011-07-05 17:27       ` Andreas Röhler

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=4E289D08.1030007@dogan.se \
    --to=deniz@dogan.se \
    --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.