branch: externals/denote
commit d3a8582c912fc7f4173b8a81ab8b56adbd18a9f0
Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>

    Fix denote--rename-file for files without an identifier
---
 denote.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 3ca404a304..f06e06626a 100644
--- a/denote.el
+++ b/denote.el
@@ -4081,7 +4081,7 @@ Respect `denote-rename-confirmations', 
`denote-save-buffers' and
                        identifier))
          (identifier (cond ((string-empty-p identifier) identifier)
                            ((string= old-identifier identifier) identifier)
-                           ((denote--file-has-backlinks-p file)
+                           ((and (not (string-empty-p old-identifier)) 
(denote--file-has-backlinks-p file))
                             (user-error "The identifier cannot be modified 
because the new identifier has backlinks"))
                            (t (funcall denote-get-identifier-function 
identifier nil))))
          (new-name (denote-format-file-name directory identifier keywords 
title extension signature))

Reply via email to