Skip to content

The denote-kill-buffers option

The user option denote-kill-buffers controls whether to kill a buffer that was generated by a Denote command. This can happen when creating a new file or renaming an existing one.

The default behaviour of creation or renaming commands such as denote and denote-rename-file is to not kill the buffer they create or modify at the end of their operation. The idea is to give the user the chance to confirm that everything is in order.

If this user option is nil (the default), buffers affected by a creation or renaming command are not automatically killed.

If set to the symbol ‘on-creation’, new notes are automatically killed.

If set to the symbol ‘on-rename’, renamed notes are automatically killed.

If set to t, new and renamed notes are killed.

If a buffer is killed, it is also saved, as if denote-save-buffers were set to a non-nil value (The denote-save-buffers option).

In all cases, if the buffer already existed before the Denote operation it is NOT automatically killed.