From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: yank-repeat-newline Date: Tue, 26 Jul 2011 21:45:40 +0200 Message-ID: <4E2F1964.4040008@easy-emacs.de> References: <4E2F11A3.3090102@easy-emacs.de> <87tya8rgrz.fsf@mithlond.arda> <4E2F1453.5010604@easy-emacs.de> <87pqkwrg2d.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1311709564 7348 80.91.229.12 (26 Jul 2011 19:46:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jul 2011 19:46:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 26 21:45:59 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 1QlnZk-00086q-31 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2011 21:45:56 +0200 Original-Received: from localhost ([::1]:42125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnZj-000854-8t for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2011 15:45:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnZf-00084m-1t for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:45:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlnZe-00054u-0f for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:45:50 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:54826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlnZd-00054j-JC for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 15:45:49 -0400 Original-Received: from [192.168.178.27] (brln-4dbc49d1.pool.mediaWays.net [77.188.73.209]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0McRym-1R3Swm2eJM-00Hewv; Tue, 26 Jul 2011 21:45:41 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 In-Reply-To: <87pqkwrg2d.fsf@mithlond.arda> X-Provags-ID: V02:K0:+J5luah60/kK47Sjbf2jgyFDD77+Ot/yMX9/CroZDZ7 dna9JVSlCLTedMizyIbm47lXRbg3Xar9gZhFPwELsX28leY6Ch 7CdCQWH/+YgEB+slt+v1VkE7A3OcXY7rc0KZKxR8ub+8qXopQZ DXo5nFRJLoBh5EJUhJVat8edZmQkVQNGCkjunnIqjz40LujWkV 5TSMFfqnJFjabnnUxXNbUKP35eKPGnQVU8eY8zoc3I= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.8 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:81795 Archived-At: Am 26.07.2011 21:35, schrieb Teemu Likonen: > * 2011-07-26T21:24:03+02:00 * Andreas Röhler 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")))) > Hi Teemu, hi Drew, thanks a lot both. Can still only one argument specify in example above. Drew presented a solution indeed. However, after all think Emacs could make a better use of these both interactive codes by separating it. It's a kind of interference with "P" "p" which makes things more complex then needed and doesn't contribute - IMHO. Will present the matter at emacs-devel. So far, Andreas