[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: append, push, and add-to-list.
From: |
Hongyi Zhao |
Subject: |
Re: append, push, and add-to-list. |
Date: |
Mon, 5 Jul 2021 10:16:45 +0800 |
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
- append, push, and add-to-list., Hongyi Zhao, 2021/07/03
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- Re: append, push, and add-to-list., Jean Louis, 2021/07/04
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/04
- RE: [External] : Re: append, push, and add-to-list., Drew Adams, 2021/07/04
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
- Re: append, push, and add-to-list.,
Hongyi Zhao <=
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/04
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/05
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05
- Re: append, push, and add-to-list., Emanuel Berg, 2021/07/05
- Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05
Re: append, push, and add-to-list., Jean Louis, 2021/07/05
Re: append, push, and add-to-list., Hongyi Zhao, 2021/07/05
Re: append, push, and add-to-list., Emanuel Berg, 2021/07/05