Variable: projectile-bookmark-scope

projectile-bookmark-scope is a customizable variable defined in projectile.el.

Value

both

Documentation

How a bookmark is recognised as belonging to a project.

Emacs bookmarks are global, so Projectile has to decide which of them belong to the project at hand. There are two ways to tell, each with a different failure mode:

- file - the bookmark's recorded file lives under the project root.
  Robust (it survives renaming the bookmark, and catches bookmarks made
  with plain bookmark-set), but blind to bookmarks that record no
  file, e.g. those of Info or Man buffers.

- name - the bookmark's name starts with the project's name followed
  by a colon and a space, which is how projectile-bookmark-set names
  bookmarks by default. Covers bookmarks without a file, but breaks as
  soon as the bookmark (or the project directory) is renamed.

- both - the default: a bookmark belongs to the project when either
  test says so.

This variable was added, or its default value changed, in projectile version 3.3.0.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defcustom projectile-bookmark-scope 'both
  "How a bookmark is recognised as belonging to a project.

Emacs bookmarks are global, so Projectile has to decide which of them
belong to the project at hand.  There are two ways to tell, each with a
different failure mode:

- `file' - the bookmark's recorded file lives under the project root.
  Robust (it survives renaming the bookmark, and catches bookmarks made
  with plain `bookmark-set'), but blind to bookmarks that record no
  file, e.g. those of Info or Man buffers.

- `name' - the bookmark's name starts with the project's name followed
  by a colon and a space, which is how `projectile-bookmark-set' names
  bookmarks by default.  Covers bookmarks without a file, but breaks as
  soon as the bookmark (or the project directory) is renamed.

- `both' - the default: a bookmark belongs to the project when either
  test says so."
  :group 'projectile
  :type '(choice (const :tag "Recorded file lives under the project root" file)
                 (const :tag "Name starts with the project name" name)
                 (const :tag "Either of the two" both))
  :package-version '(projectile . "3.3.0"))