29.2.2 Project Commands That Operate on Buffers

C-x p b

Switch to another buffer belonging to the current project (project-switch-to-buffer).

C-x p C-b

List the project buffers (project-list-buffers).

C-x p k

Kill all live buffers that belong to the current project (project-kill-buffers).

Working on a project could potentially involve having many buffers visiting files that belong to the project, and also buffers that belong to the project, but don’t visit any files (like the *compilation* buffer created by project-compile). The command C-x p b (project-switch-to-buffer) helps you switch between buffers that belong to the current project by prompting for a buffer to switch and considering only the current project’s buffers as candidates for completion.

Like the command list-buffers (see Listing Existing Buffers), the command C-x p C-b (project-list-buffers) displays a list of existing buffers, but only belonging to the current project.

When you finish working on the project, you may wish to kill all the buffers that belong to the project, to keep your Emacs session smaller. The command C-x p k (project-kill-buffers) accomplishes that: it kills all the buffers that belong to the current project that satisfy any of project-kill-buffer-conditions. If project-kill-buffers-display-buffer-list is non-nil, the buffers to be killed will be displayed first.