all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: gebser@mousecar.com
Cc: GNU Emacs List <help-gnu-emacs@gnu.org>
Subject: Re: print out all members of a list
Date: Mon, 28 Feb 2011 12:26:00 -0800	[thread overview]
Message-ID: <AANLkTikijhQYcBW=Q7h7d0do4GMM==3hoW59uOpQj607@mail.gmail.com> (raw)
In-Reply-To: <4D6BD989.9010102@mousecar.com>

On 2/28/11, ken <gebser@mousecar.com> 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



  parent reply	other threads:[~2011-02-28 20:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 15:20 print out all members of a list ken
2011-02-28 16:50 ` Teemu Likonen
2011-02-28 17:21 ` ken
2011-02-28 18:25   ` print out all members of a list, v.1.0 ken
2011-02-28 18:32   ` print out all members of a list Thierry Volpiatto
2011-02-28 20:26   ` PJ Weisberg [this message]
     [not found]   ` <mailman.5.1298917525.1451.help-gnu-emacs@gnu.org>
2011-02-28 21:32     ` print out all members of a list, v.1.0 Tim X
2011-03-01  5:48     ` Pascal J. Bourguignon
2011-03-01  6:02     ` rusi
2011-03-02  4:51       ` Barry Margolin
2011-03-02  5:33         ` rusi
2011-03-02 11:56         ` Pascal J. Bourguignon
2011-03-03  0:36           ` Barry Margolin
2011-03-03  9:02             ` Pascal J. Bourguignon
2011-03-03 15:37               ` rusi
2011-03-03 16:00                 ` Pascal J. Bourguignon
2011-03-04  2:34               ` Barry Margolin
2011-03-04  4:09                 ` Drew Adams
2011-03-04 10:39                 ` Pascal J. Bourguignon
2011-03-04 11:06                   ` David Kastrup
2011-03-05  3:24                   ` Barry Margolin
     [not found] ` <mailman.0.1298913700.1451.help-gnu-emacs@gnu.org>
2011-03-01  5:41   ` print out all members of a list Pascal J. Bourguignon
2011-03-01 11:33 ` Andreas Röhler
2011-03-01 11:44 ` Andreas Röhler
     [not found] ` <mailman.5.1298979610.15512.help-gnu-emacs@gnu.org>
2011-03-01 13:10   ` Pascal J. Bourguignon
2011-03-01 14:45     ` Stefan Monnier
2011-03-01 14:50     ` Le Wang
2011-03-01 15:10     ` Richard Riley
2011-03-01 18:39     ` Andreas Röhler
     [not found] <mailman.4.1298906433.17550.help-gnu-emacs@gnu.org>
2011-02-28 15:24 ` Marc Mientki

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='AANLkTikijhQYcBW=Q7h7d0do4GMM==3hoW59uOpQj607@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --cc=gebser@mousecar.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.