From: Jean Louis <bugs@gnu.support>
To: uzibalqa <uzibalqa@proton.me>
Cc: uzibalqa via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Looping lists through mapcar
Date: Tue, 23 Aug 2022 22:13:44 +0300 [thread overview]
Message-ID: <YwUm6KXCRWu9Bo7U@protected.localdomain> (raw)
In-Reply-To: <oTjJFqI-AzWdOyGnFHKXmIxxL3HIzTZw5V7w9Af7KgdU03fyn_0RgJjC_orFSZgiTPoO7uO4OSrT48_NsGHcgckV86KMgHIv0qtjxpMcLuI=@proton.me>
* uzibalqa <uzibalqa@proton.me> [2022-08-23 15:18]:
>
> I would like to pass a number of alists in the form assoc-table-N so that I can store data
> in another list named `nscrip'. Would like to manage the lists without having to list them
> individually. My idea has been to use mapcar, but the scheme has not worked out, and the lists
> are net being passed through the loop.
I find it difficult to understand your above description. I got
the idea that you wish to name alists such as assoc-table-1,
assoc-table-2 and that you put those symbols in a new list.
;; (dolist (aggr (list (mapcar #'construct-assoc-table
;; (number-sequence 1 8))))
;; (setq rplc (cdr (assoc word aggr)))
;; (unless (null rplc)
;; (add-to-list 'nscrip
;; (replace-regexp-in-string word rplc word))))
I cannot understand the above.
Do this: {C-h f add-to-list RET} and find quote there:
"This is handy to add some elements to configuration variables,
but please do not abuse it in Elisp code, where you are usually
better off using ‘push’ or ‘cl-pushnew’."
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2022-08-23 19:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 12:16 Looping lists through mapcar uzibalqa
2022-08-23 19:13 ` Jean Louis [this message]
2022-08-24 5:34 ` uzibalqa
2022-08-24 6:24 ` Jean Louis
2022-08-24 9:03 ` uzibalqa
2022-08-24 9:54 ` Emanuel Berg
2022-08-24 10:52 ` Jean Louis
2022-08-24 11:02 ` uzibalqa
2022-08-24 11:49 ` uzibalqa
2022-08-24 16:17 ` Jean Louis
2022-08-24 12:08 ` Jean Louis
2022-08-24 11:44 ` Emanuel Berg
2022-08-24 12:09 ` Jean Louis
2022-08-25 10:49 ` uzibalqa
2022-08-25 15:57 ` Jean Louis
2022-08-26 2:48 ` uzibalqa
2022-08-24 12:24 ` uzibalqa
2022-08-25 0:31 ` uzibalqa
2022-08-24 23:56 ` uzibalqa
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=YwUm6KXCRWu9Bo7U@protected.localdomain \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=uzibalqa@proton.me \
/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.