GNU Emacs
Emacs
Dashboard

28.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 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.

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.