Variable: xref-file-name-display

xref-file-name-display is a customizable variable defined in xref.el.gz.

Value

project-relative

Documentation

Style of file name display in *xref* buffers.

If the value is the symbol abs, show the file names in their full absolute form.

If nondirectory, show only the nondirectory (a.k.a. "base name") part of the file name.

If project-relative, the default, show only the file name relative to the current project root. If there is no current project, or if the file resides outside of its root, show that particular file name in its full absolute form.

This variable was added, or its default value changed, in Emacs 27.1.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
;;;; Commonly needed location types are defined here:

(defcustom xref-file-name-display 'project-relative
  "Style of file name display in *xref* buffers.

If the value is the symbol `abs', show the file names in their
full absolute form.

If `nondirectory', show only the nondirectory (a.k.a. \"base name\")
part of the file name.

If `project-relative', the default, show only the file name
relative to the current project root.  If there is no current
project, or if the file resides outside of its root, show that
particular file name in its full absolute form."
  :type '(choice (const :tag "absolute file name" abs)
                 (const :tag "nondirectory file name" nondirectory)
                 (const :tag "relative to project root" project-relative))
  :version "27.1")