help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looping over characters in a string in elisp?


From: Ian Zimmerman
Subject: Re: looping over characters in a string in elisp?
Date: 28 Dec 2002 16:33:06 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>> (while char in string (do stuff) )

Kai> Why does it have to be a while loop?  Why is a map-like look not
Kai> enough?

Kai> (mapcar (lambda (c) (char-to-string c)) "foobar")

Kai> This calls the lambda expression on each character and collects
Kai> the results in a list.  You can throw the result away if you
Kai> don't like it...

I can remember the time(s) when I had forgotten enough about Emacs
Lisp that I wanted to ask this question.  I always checked myself in
time and found the answer, but I think this is (a little bit of)
evidence that TFM needs a simple improvement.

Just put "STRINGS ARE ARRAYS" in big fat font at the beginning of the
Strings section (which precedes the Sequences Arrays Vectors section).

-- 
Ian Zimmerman, Oakland, California, U.S.A. 
if (sizeof(signed) > sizeof(unsigned) + 4) { delete this; }
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
>From sung-youn.kim@stonybrook.edu Sat Dec 28 21:09:05 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18SSsr-00081N-00
        for help-gnu-emacs@gnu.org; Sat, 28 Dec 2002 21:08:57 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18SSsh-0007ug-00
        for help-gnu-emacs@gnu.org; Sat, 28 Dec 2002 21:08:50 -0500
Received: from mail.ic.sunysb.edu ([129.49.1.4])
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18SSsh-0007ob-00
        for help-gnu-emacs@gnu.org; Sat, 28 Dec 2002 21:08:47 -0500
Received: from postal.ic.sunysb.edu (mail [129.49.1.4])
        by mail.ic.sunysb.edu (8.11.6/8.11.6) with SMTP id gBT28fn04422
        for <help-gnu-emacs@gnu.org>; Sat, 28 Dec 2002 21:08:41 -0500 (EST)
Received: from smtp.ic.sunysb.edu ([129.49.1.24])
 by postal.ic.sunysb.edu (NAVGW 2.5.2.9) with SMTP id M2002122821084024843
 for <help-gnu-emacs@gnu.org>; Sat, 28 Dec 2002 21:08:40 -0500
Received: from dh075-055.sbs.sunysb.edu (dh074-180.sbs.sunysb.edu
        [129.49.74.180])
        by smtp.ic.sunysb.edu (8.11.6/8.11.6) with ESMTP id gBT28eI04418
        for <help-gnu-emacs@gnu.org>; Sat, 28 Dec 2002 21:08:40 -0500 (EST)
From: "Kim, Sung-youn" <sung-youn.kim@stonybrook.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15886.22858.19036.783233@dh075-055.sbs.sunysb.edu>
Date: Sat, 28 Dec 2002 21:09:14 -0500
To: help-gnu-emacs@gnu.org
In-Reply-To: <E18SKM5-0006zY-01@monty-python.gnu.org>
References: <E18SKM5-0006zY-01@monty-python.gnu.org>
X-Mailer: VM 7.07 under 21.4 (patch 8) "Honest Recruiter" XEmacs Lucid
X-Uptime: /bin/bash: line 1: up: command not found
Subject: A question about mail setting in xemacs0
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: sung-youn.kim@stonybrook.edu
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 02:09:05 -0000


I have problem with using vm to fetch mail from POP server. It worked for a 
time being but now it does not fetch mails from the server after I setup 
smtpmail for sending email. Sending with smtpmail.el seems to working properly. 
 

Can you give me a help? 

I think, if you can send me a working custom.el, inti.el, .gnus, .vm, etc, it 
will be better and faster.

It it is necessary 

-- 
Sung-youn Kim
--------------
Dept. of Political Science
Stony Brook University (SUNY at Stony Brook)
Office: (631)-632-7664



reply via email to

[Prev in Thread] Current Thread [Next in Thread]