Variable: denote-rename-buffer-format

denote-rename-buffer-format is a customizable variable defined in denote.el.

Value

"%D"

Documentation

The format of the buffer name denote-rename-buffer should use.

This also covers the denote-rename-buffer-mode(var)/denote-rename-buffer-mode(fun). The resulting buffer name will also include the denote-buffer-name-prefix.

The value of this user option is a string that treats specially the following specifiers:

- The %t is the Denote TITLE in the front matter or the file name.
- The %T is the Denote TITLE in the file name.
- The %i is the Denote IDENTIFIER of the file.
- The %I is the identifier converted to DAYNAME, DAYNUM MONTHNUM YEAR.
- The %d is the same as %i (DATE mnemonic).
- The %D is a "do what I mean" which behaves the same as %t and if
  that returns nothing, it falls back to %I, then %i.
- The %s is the Denote SIGNATURE of the file.
- The %k is the Denote KEYWORDS of the file.
- The %b inserts denote-rename-buffer-backlinks-indicator.
- The %% is a literal percent sign.

In addition, the following flags are available for each of the specifiers:

- 0 :: Pad to the width, if given, with zeros instead of spaces.
- - :: Pad to the width, if given, on the right instead of the left.
- < :: Truncate to the width and precision, if given, on the left.
- > :: Truncate to the width and precision, if given, on the right.
- ^ :: Convert to upper case.
- _ :: Convert to lower case.

When combined all together, the above are written thus:

    %<flags><width><precision>SPECIFIER-CHARACTER

Any other string it taken as-is.

This variable was added, or its default value changed, in denote version 4.0.0.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defcustom denote-rename-buffer-format "%D"
  "The format of the buffer name `denote-rename-buffer' should use.
This also covers the `denote-rename-buffer-mode'.  The resulting buffer
name will also include the `denote-buffer-name-prefix'.

The value of this user option is a string that treats specially the
following specifiers:

- The %t is the Denote TITLE in the front matter or the file name.
- The %T is the Denote TITLE in the file name.
- The %i is the Denote IDENTIFIER of the file.
- The %I is the identifier converted to DAYNAME, DAYNUM MONTHNUM YEAR.
- The %d is the same as %i (DATE mnemonic).
- The %D is a \"do what I mean\" which behaves the same as %t and if
  that returns nothing, it falls back to %I, then %i.
- The %s is the Denote SIGNATURE of the file.
- The %k is the Denote KEYWORDS of the file.
- The %b inserts `denote-rename-buffer-backlinks-indicator'.
- The %% is a literal percent sign.

In addition, the following flags are available for each of the specifiers:

- 0 :: Pad to the width, if given, with zeros instead of spaces.
- - :: Pad to the width, if given, on the right instead of the left.
- < :: Truncate to the width and precision, if given, on the left.
- > :: Truncate to the width and precision, if given, on the right.
- ^ :: Convert to upper case.
- _ :: Convert to lower case.

When combined all together, the above are written thus:

    %<flags><width><precision>SPECIFIER-CHARACTER

Any other string it taken as-is."
  :type 'string
  :package-version '(denote . "4.0.0")
  :group 'denote-rename-buffer)