Nordlöw
Nordlöw

Reputation: 12138

Get List of All Emacs Buffers

How do I get a list of all buffers in Emacs? I then want to iterate this list using dolist or mapcar.

Upvotes: 3

Views: 262

Answers (2)

hd1
hd1

Reputation: 34677

(list-buffers) and work from there?

Upvotes: -1

Anton Kovalenko
Anton Kovalenko

Reputation: 21517

Use (buffer-list &optional frame):

Return a list of all existing live buffers. If the optional arg FRAME is a frame, we return the buffer list in the proper order for that frame: the buffers show in FRAME come first, followed by the rest of the buffers.

Upvotes: 6

Related Questions