I am trying to get a list of buffers through elisp. So I created the following function:
(mapcar (function buffer-name) (buffer-list))
This works when I do something like:
(minibuffer-message (mapcar (function buffer-name) (buffer-list)))
However, the following line of code does not work:
(insert (mapcar (function buffer-name) (buffer-list)))
Q: Could this just be a noob mistake? Is there a better way of doing it?