branch: externals/denote commit 8f7099eeb8af5b0e9165a6ed1af58078e04ecb2a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Document the new user option denote-buffer-name-prefix This builds on top of commit 8e1341d by James Kalyan, which was done in pull request 597: <https://github.com/protesilaos/denote/pull/597>. James is in the process of assigning copyright to the Free Software Foundation. --- README.org | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/README.org b/README.org index bc9345fdf7..1e47ceb3fb 100644 --- a/README.org +++ b/README.org @@ -3310,7 +3310,30 @@ multimedia in a systematic way (and, perhaps, use them as attachments for the notes Denote produces if you are writing Org notes and are using its standand attachments' facility). -* Automatically rename Denote buffers +* Set the prefix of all Denote buffers +:PROPERTIES: +:CUSTOM_ID: h:a3a1a2af-a0b8-420c-acb1-855a7d113e69 +:END: + +[ This is part of {{{development-version}}}. ] + +#+vindex: denote-buffer-name-prefix +The user option ~denote-buffer-name-prefix~ specifies the text used as +a prefix of all buffer names generated by Denote. This applies to the +buffer of query links, backlinks, ~denote-grep~, ~denote-dired~, as +well as those affected by ~denote-rename-buffer-mode~: + +- [[#h:d9a84289-2f73-4ef9-b4f0-9a0aa3e9bf0d][Add a query link]]. +- [[#h:c73f1f68-e214-49d5-b369-e694f6a5d708][The backlinks' buffer]]. +- [[#h:e71c9d14-7e88-4386-91d0-9ad249947077][Use ~denote-grep~ to search inside files]]. +- [[#h:9fe01e63-f34f-4479-8713-f162a5ca865e][Display filtered and sorted files with ~denote-sort-dired~ or ~denote-dired~]]. +- [[#h:3ca4db16-8f26-4d7d-b748-bac48ae32d69][Automatically rename Denote file buffers]]. + +By default, the value of ~denote-buffer-name-prefix~ is ="[D] "=. +Users can set it to any string they want, such as ="<Denote> "=, or +even an empty string to not have any such prefix. + +* Automatically rename Denote file buffers :PROPERTIES: :CUSTOM_ID: h:3ca4db16-8f26-4d7d-b748-bac48ae32d69 :END: @@ -3331,10 +3354,11 @@ file. This applies both to existing Denote files as well as new ones Buffers are named by applying the function specified in the user option ~denote-rename-buffer-function~. The default function is ~denote-rename-buffer~: it renames the buffer based on the template -set in the user option ~denote-rename-buffer-format~. By default, the -formatting template targets only the =TITLE= component of the file -name ([[#h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d][The file-naming scheme]]). Other fields are explained elsewhere in -this manual ([[#h:35507c18-35b1-41b9-9d80-52f54fcef3cb][The denote-rename-buffer-format]]). +set in the user option ~denote-rename-buffer-format~, combined with +the ~denote-buffer-name-prefix~ ([[#h:a3a1a2af-a0b8-420c-acb1-855a7d113e69][Set the prefix of all Denote buffers]]). +Other fields are explained elsewhere in this manual ([[#h:35507c18-35b1-41b9-9d80-52f54fcef3cb][The denote-rename-buffer-format]]). + +[ The ~denote-buffer-name-prefix~ is part of {{{development-version}}}. ] Note that renaming a buffer is not the same as renaming a file ([[#h:532e8e2a-9b7d-41c0-8f4b-3c5cbb7d4dca][Renaming files]]). The former is just for convenience inside of Emacs. @@ -3348,10 +3372,15 @@ available to all programs. The user option ~denote-rename-buffer-format~ controls how the function ~denote-rename-buffer~ chooses the name of the -buffer-to-be-renamed. +buffer-to-be-renamed. It also affects the ~denote-rename-buffer-mode~ +([[#h:3ca4db16-8f26-4d7d-b748-bac48ae32d69][Automatically rename Denote file buffers]]). + +The value of this user option is a string that gets combined with the +~denote-buffer-name-prefix~ ([[#h:a3a1a2af-a0b8-420c-acb1-855a7d113e69][Set the prefix of all Denote buffers]]). +The following specifiers are placeholders for Denote file name +components ([[#h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d][The file-naming scheme]]): -The value of this user option is a string. The following specifiers -are placeholders for Denote file name components ([[#h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d][The file-naming scheme]]): +[ The ~denote-buffer-name-prefix~ is part of {{{development-version}}}. ] #+vindex: denote-rename-buffer-backlinks-indicator - The =%t= is the Denote =TITLE= in the front matter or the file name.