Skip to content

Rename a file by adding or removing a signature interactively

The command denote-rename-file-signature streamlines the process of interactively adding or removing a signature to/from a file, while changing its file name accordingly. It asks for a signature using the familiar minibuffer prompt (Standard note creation). It then renames the file. The command respect the values of denote-rename-confirmations and denote-save-buffers:

Technically, denote-rename-file-signature is a wrapper for denote-rename-file, doing all the things that does (Rename a single file).

Concretely, this command can add or remove a signature in one go. It does it by prepopulating the minibuffer prompt with the existing signature. Users can then modify it. An empty input means to remove the signature altogether (The file-naming scheme).

[ NOTE: Please check with your minibuffer user interface how to provide an empty input. The Emacs default setup accepts the empty minibuffer contents as they are, though popular packages like vertico use the first available completion candidate instead. For vertico, the user must either move one up to select the prompt and then type ‘RET’ there with empty contents, or use the command vertico-exit-input with empty contents. That Vertico command is bound to ‘M-RET’ as of this writing on 2024-06-30 10:37 +0300. ]