unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: Why is result of `car' ⇒ quote ? [SOLVED]
Date: Wed, 15 Jun 2022 00:53:15 +0300	[thread overview]
Message-ID: <YqkDSyFStDf2V3PB@protected.localdomain> (raw)
In-Reply-To: <87h74nr19s.fsf@dataswamp.org>

* Emanuel Berg <incal@dataswamp.org> [2022-06-14 13:27]:
> >> Here I do not understand it quite, why do I get result of
> >> `car' below, to be `quote'?
> >>
> >> (nth 2 (car exporters)) ; ("Block 227, Plot 20086, Kakajja
> >> Zone") (car (nth 2 (car exporters))) ; quote
> >
> > And the answer is ...
> >
> > You have quoted the list twice!
> >
> > (setq exporters '((1 2 '("Block 227, Plot 20086, Kakajja Zone"))))
> >
> > (nth 2 (car exporters)) ; '("Block 227, Plot 20086, Kakajja Zone")
> >
> > (car (nth 2 (car exporters))) ; quote
> 
> Instead of quoting the list twice, use `list' three times
> 
>   (setq exporters (list (list 1 2 (list "Block 227, Plot 20086, Kakajja Zone"))))
>   (nth 2 (car exporters))
>   (car (nth 2 (car exporters))) ; "Block 227, Plot 20086, Kakajja Zone"
> 
> and then it works :)

That is what I did now, thanks.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



      reply	other threads:[~2022-06-14 21:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  8:28 Why is result of `car' ⇒ quote ? Jean Louis
2022-06-14  8:31 ` Po Lu
2022-06-14 10:16 ` Emanuel Berg
2022-06-14 10:24   ` Emanuel Berg
2022-06-14 21:53     ` Jean Louis [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqkDSyFStDf2V3PB@protected.localdomain \
    --to=bugs@gnu.support \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).