From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Case Newsgroups: gmane.emacs.help Subject: Re: newbie elisp help ?? Date: Wed, 15 Aug 2007 15:07:03 -0400 Message-ID: <1187204823.2712.192.camel@CASE> References: <1187198873.2712.158.camel@CASE> <46C342F9.8070808@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1187204839 3528 80.91.229.12 (15 Aug 2007 19:07:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2007 19:07:19 +0000 (UTC) To: EMACS List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 15 21:07:16 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ILOD3-0000Nt-NG for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 21:07:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILOD3-0002B1-22 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 15:07:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILOCl-0002Ak-WC for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 15:06:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILOCk-0002AC-MW for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 15:06:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILOCk-0002A9-Fg for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 15:06:54 -0400 Original-Received: from smtp104.rog.mail.re2.yahoo.com ([206.190.36.82]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ILOCk-0006cr-2m for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 15:06:54 -0400 Original-Received: (qmail 36912 invoked from network); 15 Aug 2007 19:06:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Subject:From:To:In-Reply-To:References:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=PliPncbciBi6SB1JikYjCupSrIWyCuyhpz5bIU/vePAxpEZo4TaJcKgvbCG5r9juGaN+1OBoXw5uTb2zEC79Tt6uMlDB4iVl7Tg0ofScoidO9f4m2WSdXBslTfUJ9shGap99yLV4GOt+n+GJMLSlF56k/siBwtBuKgeEzLSWtm0= ; Original-Received: from unknown (HELO ?192.168.1.5?) (billlinux@rogers.com@74.104.51.86 with plain) by smtp104.rog.mail.re2.yahoo.com with SMTP; 15 Aug 2007 19:06:53 -0000 X-YMail-OSG: 35kj7iMVM1mcrcgXizQljyFqO7U9fm1M0vNWAJxTcDJsYTyMqaZ.arNeN2ixJ4qzsg-- In-Reply-To: <46C342F9.8070808@gmail.com> X-Mailer: Evolution 2.10.3 (2.10.3-2.fc7) X-Detected-Kernel: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46580 Archived-At: Hi Alexis; BINGO! Worked like a charm. On Wed, 2007-08-15 at 20:16 +0200, Alexis Roda wrote: > En/na William Case ha escrit: > > Hi; > > > > I am working in the scratch pad using C-j to test the function as it is > > being built. I have: (insert "* "). It returns "* nil". Obviously I > > don't want the "nil" to appear. How do I get rid of it? > > the insert function inserts "*" and returns nil. You call it by its side > effects, so you can safely ignore the return value (it will not be > inserted). > > > More importantly to me, how do I get the (insert "* ") command to repeat > > 27 times to give me 54 characters across the buffer? I know how to make > > a recursive loop, but it seems to me this is a fairly common challenge > > and there is a probably a function for repetition that I can't find. > > Probably there's a better way: > > (dotimes (some_var 27) (insert "* ")) Tried dotimes early on. Couldn't get it to work so I moved on. I don't remember what I did exactly, that was hours ago, but your suggestion sure works. Thanks. -- Regards Bill