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: newbie elisp help ?? Date: Wed, 15 Aug 2007 13:27:53 -0400 Message-ID: <1187198873.2712.158.camel@CASE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1187198885 14358 80.91.229.12 (15 Aug 2007 17:28:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2007 17:28:05 +0000 (UTC) To: EMACS List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 15 19:28:02 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 1ILMf4-0000y1-Dd for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 19:28:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILMf3-00063P-Py for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 13:28:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILMeq-00063F-DT for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 13:27:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILMen-00062x-Ve for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 13:27:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILMen-00062u-Qr for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 13:27:45 -0400 Original-Received: from smtp100.rog.mail.re2.yahoo.com ([206.190.36.78]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ILMen-0001Jr-HF for help-gnu-emacs@gnu.org; Wed, 15 Aug 2007 13:27:45 -0400 Original-Received: (qmail 70032 invoked from network); 15 Aug 2007 17:27:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=C9AnJcLJYFYlOU26x7FeeHHnDXNMlGvuSDSDU6Md7EebMeSL9a87ZIvn0UPsjHoDUx29dMV5eEHl6rSDc75I3NqV1JdQ1w4LiXNOgKdBkctiUtziJZgAOdjncrW4jrc5AzUhskfNo7O4f7qPpwIJs0nhMdUWM6qHvFszDicZC5I= ; Original-Received: from unknown (HELO ?192.168.1.5?) (billlinux@rogers.com@74.104.51.86 with plain) by smtp100.rog.mail.re2.yahoo.com with SMTP; 15 Aug 2007 17:27:44 -0000 X-YMail-OSG: 7gu.z74VM1lC3tWaRQxBDTYq8JXhEGC5JGkolTvQCrfH2jxdDGvM5asjNJ_Y38681g-- 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:46571 Archived-At: Hi; I am trying to write a function that will insert a line of asterisks+ spaces across a buffer (as a section divider). It was started as an exercise and has become an exercise in futility. 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? 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. I suppose I am asking for the programming equivalent of 'C-u n'. 'insert-char' allows for repeating but only one character at a time, not two. Any guidance would be appreciated. -- Regards Bill