From: William Case <billlinux@rogers.com>
To: EMACS List <help-gnu-emacs@gnu.org>
Subject: Re: newbie elisp help ??
Date: Wed, 15 Aug 2007 15:07:03 -0400 [thread overview]
Message-ID: <1187204823.2712.192.camel@CASE> (raw)
In-Reply-To: <46C342F9.8070808@gmail.com>
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
next prev parent reply other threads:[~2007-08-15 19:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 17:27 newbie elisp help ?? William Case
2007-08-15 17:48 ` Lennart Borgman (gmail)
2007-08-15 18:16 ` William Case
2007-08-15 18:24 ` Lennart Borgman (gmail)
[not found] ` <46C342F9.8070808@gmail.com>
2007-08-15 19:07 ` William Case [this message]
[not found] <mailman.4824.1187198869.32220.help-gnu-emacs@gnu.org>
2007-08-15 18:02 ` Pascal Bourguignon
2007-08-15 19:04 ` William Case
2007-08-17 20:44 ` Thien-Thi Nguyen
2007-08-15 20:08 ` Joel J. Adamson
2007-08-16 2:30 ` William Case
[not found] ` <mailman.4845.1187231410.32220.help-gnu-emacs@gnu.org>
2007-08-16 14:09 ` Joel J. Adamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1187204823.2712.192.camel@CASE \
--to=billlinux@rogers.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.