From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: yank-repeat-newline Date: Tue, 26 Jul 2011 22:35:06 +0300 Message-ID: <87pqkwrg2d.fsf@mithlond.arda> References: <4E2F11A3.3090102@easy-emacs.de> <87tya8rgrz.fsf@mithlond.arda> <4E2F1453.5010604@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: Quoted-Printable X-Trace: dough.gmane.org 1311708922 3187 80.91.229.12 (26 Jul 2011 19:35:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jul 2011 19:35:22 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?iso-8859-1?Q?Andreas_R=F6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 26 21:35:18 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 1QlnPR-00040T-Aw for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2011 21:35:17 +0200 Original-Received: from localhost ([::1]:46967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnPQ-0005wo-VG for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2011 15:35:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnPL-0005wU-Dq for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:35:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlnPK-0001wj-G0 for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:35:11 -0400 Original-Received: from mta-out.inet.fi ([195.156.147.13]:41625 helo=jenni2.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnPK-0001wd-6G for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:35:10 -0400 Original-Received: from mithlond.arda (84.251.132.215) by jenni2.inet.fi (8.5.133) id 4DF73E8501E0738C; Tue, 26 Jul 2011 22:35:07 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.72) (envelope-from ) id 1QlnPH-0002D5-7J; Tue, 26 Jul 2011 22:35:07 +0300 In-Reply-To: <4E2F1453.5010604@easy-emacs.de> ("Andreas =?iso-8859-1?Q?R?= =?iso-8859-1?Q?=F6hler=22's?= message of "Tue, 26 Jul 2011 21:24:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 195.156.147.13 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:81794 Archived-At: * 2011-07-26T21:24:03+02:00 * Andreas R=F6hler wrote: > Am 26.07.2011 21:19, schrieb Teemu Likonen: >> Please tell us what you want. How should the command work? How do you >> want to execute it and what should it do? > It's in the docstring: repeat last yank resp. to numerical arg. Also I > want in some cases have a newline added - ie insert yanks vertically. Yes, but how do you want to execute those "some cases"? For example, you could make the command ask: (defun yank-repeat-newline (arg &optional nl) "With numerical ARG, repeat last yank ARG times. With optional arg NL, also insert newlines. " (interactive (list (prefix-numeric-value current-prefix-arg) (y-or-n-p "Add a newline? "))) (dotimes (i arg) (insert (car kill-ring)) (if nl (insert "\n"))))