From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: print out all members of a list Date: Mon, 28 Feb 2011 12:26:00 -0800 Message-ID: References: <4D6BBD34.6050407@mousecar.com> <4D6BD989.9010102@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1298924796 18032 80.91.229.12 (28 Feb 2011 20:26:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Feb 2011 20:26:36 +0000 (UTC) Cc: GNU Emacs List To: gebser@mousecar.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 28 21:26:32 2011 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.69) (envelope-from ) id 1Pu9fr-0003cL-Uy for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Feb 2011 21:26:32 +0100 Original-Received: from localhost ([127.0.0.1]:53000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu9fr-0000Fs-Ay for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Feb 2011 15:26:31 -0500 Original-Received: from [140.186.70.92] (port=50792 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu9fT-0000FS-St for help-gnu-emacs@gnu.org; Mon, 28 Feb 2011 15:26:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pu9fR-0002o9-DS for help-gnu-emacs@gnu.org; Mon, 28 Feb 2011 15:26:07 -0500 Original-Received: from smtpauth04.prod.mesa1.secureserver.net ([64.202.165.95]:46266) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Pu9fQ-0002ny-UT for help-gnu-emacs@gnu.org; Mon, 28 Feb 2011 15:26:05 -0500 Original-Received: (qmail 32128 invoked from network); 28 Feb 2011 20:26:02 -0000 Original-Received: from unknown (209.85.161.41) by smtpauth04.prod.mesa1.secureserver.net (64.202.165.95) with ESMTP; 28 Feb 2011 20:26:02 -0000 Original-Received: by fxm5 with SMTP id 5so4815590fxm.0 for ; Mon, 28 Feb 2011 12:26:00 -0800 (PST) Original-Received: by 10.223.96.67 with SMTP id g3mr7334234fan.114.1298924760520; Mon, 28 Feb 2011 12:26:00 -0800 (PST) Original-Received: by 10.223.97.71 with HTTP; Mon, 28 Feb 2011 12:26:00 -0800 (PST) In-Reply-To: <4D6BD989.9010102@mousecar.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 64.202.165.95 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:79581 Archived-At: On 2/28/11, ken wrote: > On 02/28/2011 10:20 AM ken wrote: >> (car '("one" "two" "three")) >> >> prints out "one" ... the first of the list. How to print out all >> elements of the list (in order and with the double quotes around them? >> I'm actually looking just to substitute something for "car" and not >> write an entire function. Or is there no such thing? >> >> Thanks much. >> > > I've been criticized for my elisp terminology-- and properly so--, so > let me rephrase: > > (car '("one" "two" "three")) > > returns a string consisting of the first element (?) of the list. Is > there an elisp function which either (1) returns one string for each > element of the list or (2) returns one string containing all elements of > the list? > > E.g.: > > (1) "one" "two" "three" > > or > > (2) "onetwothree" > > preferably (1). I'm not sure what (1) would actually *mean*, since a list of three strings is what you already have, but if you did want to print each of them out, then perhaps something like (mapc 'insert '("one" "two" "three")) -PJ