Variable: projectile-compilation-buffer-scope
projectile-compilation-buffer-scope is a customizable variable defined
in projectile.el.
Value
nil
Documentation
What a lifecycle command's compilation buffer is named after.
Compiling, testing and running a project all use compilation-mode and
therefore share one buffer, so running the tests discards the build
output and vice versa - across projects as well as within one.
Qualifying the buffer name keeps them apart. The value is a list of:
- project - the project name (*compilation*<my-project>), so two
projects don't overwrite each other's output. This also narrows the
buffers offered for saving before a command runs to the project's own.
- command - the lifecycle command (*compilation*<test>), so a build
and a test run don't overwrite each other.
The two compose: with both, the buffer is *compilation*<my-project:test>. Setting this to t is the same as naming both. With nil there's a single shared compilation buffer, as in plain Emacs.
This variable was added, or its default value changed, in projectile version 3.4.0.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defcustom projectile-compilation-buffer-scope nil
"What a lifecycle command's compilation buffer is named after.
Compiling, testing and running a project all use `compilation-mode' and
therefore share one buffer, so running the tests discards the build
output and vice versa - across projects as well as within one.
Qualifying the buffer name keeps them apart. The value is a list of:
- `project' - the project name (`*compilation*<my-project>'), so two
projects don't overwrite each other's output. This also narrows the
buffers offered for saving before a command runs to the project's own.
- `command' - the lifecycle command (`*compilation*<test>'), so a build
and a test run don't overwrite each other.
The two compose: with both, the buffer is `*compilation*<my-project:test>'.
Setting this to t is the same as naming both. With nil there's a single
shared compilation buffer, as in plain Emacs."
:group 'projectile
:type '(choice (const :tag "One shared buffer" nil)
(const :tag "Project and command" t)
(set :tag "Selected aspects"
(const :tag "Project" project)
(const :tag "Lifecycle command" command)))
:package-version '(projectile . "3.4.0"))