branch: externals/denote
commit 5789ca599b2c3a4d7f6bed427193dc18e36699f7
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Clarify denote-rename-file docs about keeping components not covered by 
denote-prompts
---
 README.org |  9 +++------
 denote.el  | 10 ++++------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/README.org b/README.org
index 45deea1498..31f68c28a6 100644
--- a/README.org
+++ b/README.org
@@ -1232,12 +1232,9 @@ separated by a comma, else the ~crm-separator~).
 For all prompts, the ~denote-rename-file~ interprets an empty input as
 an instruction to remove that file name component. For example, if a
 =TITLE= prompt is available and =FILE= is 
=20240211T093531--some-title__keyword1.org=
-then it renames =FILE= to =20240211T093531__keyword1.org=. For
-interactive use, this also means that if a prompt is missing from the
-~denote-prompts~ the corresponding file name component will be removed
-during the renaming process (e.g. a ~denote-prompts~ without an entry
-for keywords is the same as passing an empty/nil =KEYWORDS= argument,
-thus removing the keywords of the file).
+then it renames =FILE= to =20240211T093531__keyword1.org=. If a file
+name component is present, but there is no entry for it in
+~denote-prompts~, keep it as-is.
 
 [ NOTE: Please check with your minibuffer user interface how to
   provide an empty input. The Emacs default setup accepts the empty
diff --git a/denote.el b/denote.el
index 80caf685f9..bc525d73c0 100644
--- a/denote.el
+++ b/denote.el
@@ -2780,12 +2780,10 @@ keywords, each separated by a comma, else the 
`crm-separator').
 For all prompts, interpret an empty input as an instruction to
 remove that file name component.  For example, if a TITLE prompt
 is available and FILE is 20240211T093531--some-title__keyword1.org
-then rename FILE to 20240211T093531__keyword1.org.  For
-interactive use, this also means that if a prompt is missing from
-the `denote-prompts' the corresponding file name component will
-be removed during the renaming process (e.g.  a `denote-prompts'
-without an entry for keywords is the same as passing an empty/nil
-KEYWORDS argument, thus removing the keywords of the file).
+then rename FILE to 20240211T093531__keyword1.org.
+
+If a file name component is present, but there is no entry for it in
+`denote-prompts', keep it as-is.
 
 [ NOTE: Please check with your minibuffer user interface how to
   provide an empty input.  The Emacs default setup accepts the

Reply via email to