From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: C K Kashyap Newsgroups: gmane.emacs.help Subject: Re: Repeat count for yanking Date: Wed, 6 Jul 2011 11:56:39 +0530 Message-ID: References: <128vsdeyqg.fsf@news.eternal-september.org> <0A0F98DA-B6DA-4C1B-B3E2-D5F76299AD75@gmail.com> <87y60c99s4.fsf@gmail.com> <877h7wx2rq.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015174beb46e2006d04a760aef4 X-Trace: dough.gmane.org 1309933747 19534 80.91.229.12 (6 Jul 2011 06:29:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 06:29:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Thierry Volpiatto To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 08:29:03 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QeLbZ-0007ES-Uh for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 08:29:02 +0200 Original-Received: from localhost ([::1]:58610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeLbY-0008MG-9m for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 02:29:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeLZM-0008LL-4c for help-gnu-emacs@gnu.org; Wed, 06 Jul 2011 02:26:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeLZJ-0007MH-TG for help-gnu-emacs@gnu.org; Wed, 06 Jul 2011 02:26:43 -0400 Original-Received: from mail-fx0-f52.google.com ([209.85.161.52]:52842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeLZJ-0007Lo-EU for help-gnu-emacs@gnu.org; Wed, 06 Jul 2011 02:26:41 -0400 Original-Received: by fxd18 with SMTP id 18so6040532fxd.39 for ; Tue, 05 Jul 2011 23:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CYe7rNBe7vi76J6irRNWbvaOiS0hNL+lEw/WIdFSlc0=; b=iQwQVLgycT1eQj9vX7HkQaEVUp3vxRr2+K+SzJR/vWkDxQMkJLkOR40hnJF8fjy+GW /jLbzlb/atTS0zNXKyKf2jq78LCutjZl248KmJUwEimdHgEm2NUB2q4n6oe8QZNA6ptN e4GE4ISNbDkmhp+dBFWEELOJ3I76VH4uNU28Q= Original-Received: by 10.223.99.153 with SMTP id u25mr12446591fan.112.1309933599588; Tue, 05 Jul 2011 23:26:39 -0700 (PDT) Original-Received: by 10.223.86.66 with HTTP; Tue, 5 Jul 2011 23:26:39 -0700 (PDT) In-Reply-To: <877h7wx2rq.fsf@mithlond.arda> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.52 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81504 Archived-At: --0015174beb46e2006d04a760aef4 Content-Type: text/plain; charset=ISO-8859-1 > > * 2011-07-05T14:44:43+02:00 * Thierry Volpiatto wrote: > > > M-: (loop repeat 5 do (progn (yank) (insert "\n"))) > > Of course we include the newline in the last kill and do this: > > M-: (dotimes (i 4) (yank)) > > Or use this: > > (defun yank-repeatedly (n) > (interactive "NHow many times: ") > (dotimes (i n) > (yank))) > > Thanks for all the lisp solutions - this is exactly why I have picked up emacs.... Regards, Kashyap --0015174beb46e2006d04a760aef4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
* 2011-07-05T14:44:43+02:00 * Thierry Volpiatto wrote:

> M-: (loop repeat 5 do (progn (yank) (insert "\n")))

Of course we include the newline in the last kill and do this:

=A0 =A0M-: (dotimes (i 4) (yank))

Or use this:

=A0 =A0(defun yank-repeatedly (n)
=A0 =A0 =A0(interactive "NHow many times: ")
=A0 =A0 =A0(dotimes (i n)
=A0 =A0 =A0 =A0(yank)))



Thanks for all the lisp solution= s - this is exactly why I have picked up emacs....

Regards,
Kashyap
--0015174beb46e2006d04a760aef4--