help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending to a list


From: steve-humphreys
Subject: Re: Appending to a list
Date: Mon, 14 Dec 2020 05:23:58 +0100

> Sent: Monday, December 14, 2020 at 5:07 AM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Appending to a list
>
> steve-humphreys@gmx.com writes:
>
> > Consider I have the following two templates, and want a make a list
> > named "tmplt-animal", which I can then pass to org-capture-templates.
> >
> > (setq org-capture-templates tmplt-animal)
> >
> > How can I use "push" to do that?
> >
> > -------- template code --------
> > [...]
>
> Seems your list is actually not an element to add that just happens to
> be a list, but a list of elements you want to add (but the elements are
> also lists again, ehem...)

I thought I could push element by element.

> In this case you want to `append' the lists, not `push'.  You may also
> define those bindings using `defvar' if you really want to set all the
> used variables at top level.

I got inspiration from some discussions here that push is more efficient
and wanted to have a go.  Yes, I do use push to make the larger list.
Have not thought about defvar before.  I have read that "setq" does not
introduce a variable, but I would need some explanation about that.

> Michael.
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]