The function used to generate the names of Magit buffers.
Such a function should take the options
as well as
magit-buffer-name-format into account. If it doesn’t,
then should be clearly stated in the doc-string. And if it supports
%-sequences beyond those mentioned in the doc-string of the option
magit-buffer-name-format, then its own doc-string should describe
This function returns a buffer name suitable for a buffer whose
major-mode is MODE and which shows information about the repository
default-directory is located.
This function uses
magit-buffer-name-format and supporting all of
the %-sequences mentioned the documentation of that option. It also
respects the option
The format string used to name Magit buffers.
At least the following %-sequences are supported:
The name of the major-mode, but with the
-mode suffix removed.
%m but abbreviate
The value the buffer is locked to, in parentheses, or an empty string if the buffer is not locked to a value.
%v, but the string is prefixed with a space, unless it is an
The top-level directory of the working tree of the repository, or
magit-uniquify-buffer-names is non-nil an abbreviation of that.
%t, but append an asterisk if and only if
magit-uniquify-buffer-names is nil.
The value should always contain
magit-uniquify-buffer-names is non-nil, then the value must end
%T (see issue #2841).
This option controls whether the names of Magit buffers are uniquified. If the names are not being uniquified, then they contain the full path of the top-level of the working tree of the corresponding repository. If they are being uniquified, then they end with the basename of the top-level, or if that would conflict with the name used for other buffers, then the names of all these buffers are adjusted until they no longer conflict.
This is done using the
uniquify package; customize its options to
control how buffer names are uniquified.