From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: append, push, and add-to-list.
Date: Mon, 5 Jul 2021 10:16:45 +0800 [thread overview]
Message-ID: <CAGP6POL-3hLgGT0ArSa5PE1ryS60C1vqfSa+YSE2FReG4g66YQ@mail.gmail.com> (raw)
In-Reply-To: <8735suaw71.fsf@zoho.eu>
On Mon, Jul 5, 2021 at 12:19 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > I've noticed there are some similar functions, i.e., append,
> > push, and add-to-list, for revising/updating the content of
> > a list. But I'm still not so clear on the specific use
> > scenarios for them. Consider the following command [1]
>
> `nconc', `cl-pushnew', (setq lst `(,@lst el)) ...
Does the following append `el' to `lst'?
(setq lst `(,@lst el))
>
> > [...] Which methods are preferable?
>
> Good question, perhaps in the manual somewhere they listed
> and explained all in one place, if not, the help (`C-h f')
> should be your friend.
>
> But my intuition tells me, just because there are many options
> a, b, ..., and z, that doesn't mean necessarily that one is
> optimal for that situation.
This is one of the reasons that baffles me the most - there are so
many functions in Emacs.
HY
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China
next prev parent reply other threads:[~2021-07-05 2:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-04 3:18 append, push, and add-to-list Hongyi Zhao
2021-07-04 4:35 ` Jean Louis
2021-07-04 5:11 ` Hongyi Zhao
2021-07-04 11:28 ` Jean Louis
2021-07-04 13:50 ` Hongyi Zhao
2021-07-04 15:58 ` Jean Louis
2021-07-05 2:04 ` Hongyi Zhao
2021-07-04 16:01 ` [External] : " Drew Adams
2021-07-04 16:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-04 16:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 2:16 ` Hongyi Zhao [this message]
2021-07-05 3:48 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 4:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 5:07 ` Hongyi Zhao
2021-07-05 5:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 6:19 ` Hongyi Zhao
2021-07-05 5:06 ` Jean Louis
2021-07-05 6:22 ` Hongyi Zhao
2021-07-05 6:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2021-07-05 14:37 Drew Adams
2021-07-05 14:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 15:19 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 16:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:54 ` Jean Louis
2021-07-06 20:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 15:41 ` tomas
2021-07-05 16:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 17:21 ` tomas
2021-07-06 1:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-05 18:39 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-05 20:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:57 ` Jean Louis
2021-07-06 20:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-06 19:56 ` Jean Louis
2021-07-06 20:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
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=CAGP6POL-3hLgGT0ArSa5PE1ryS60C1vqfSa+YSE2FReG4g66YQ@mail.gmail.com \
--to=hongyi.zhao@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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).