Fork me on GitHub
#emacs
<
2019-04-11
>
solf12:04:06

thanks @cmack, didn't knew about nconc

solf12:04:58

the C-h f description of it is rather cryptic though

solf12:04:00

Concatenate any number of lists by altering them.
Only the last argument is not altered, and need not be a list.

cmack12:04:26

@dromar56 it’s definitely a common lisp / mutatable-progamming-world thing… but also handy when you are programming emacs 🙂 forgive me if you’ve already seen this, but http://www.gigamonkeys.com/book/loop-for-black-belts.html is a good resource for the common lisp loop macro and probably much of it can be transferred to emacs’ cl-loop

solf12:04:06

I found that page while looking for a way to nest cl-loop, but for lack of time didn't gave it a long read, will save it for this week-end 🙂

cmack12:04:20

I just saw that footnote 6 on that page has a brief summary of nconc

solf12:04:02

oh that's cool, so I could also have used append

solf12:04:28

which is a name easier to remember

solf12:04:49

My main problem with emacs lisp is that I never know what the functions I want to use are called

cmack16:04:02

@dromar56 apropos is one way you can search for commands (without using google) I think it’s bound to C-h a by default