branch: externals/denote-org
commit 8e03531a04f8c9c069ddb0797b3785f849ad4c1f
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make org-dblock-write:denote-sequence not fail on empty name
    
    It is not essential. What we are interested in is to return nil if
    there are no matching files.
---
 denote-org.el | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/denote-org.el b/denote-org.el
index 5be4577fe2..7aa0a2ba91 100644
--- a/denote-org.el
+++ b/denote-org.el
@@ -1026,17 +1026,17 @@ If sequence does not start with a =, then include it."
 When sequence is an empty string, then use all Denote files with a sequence.
 
 Used by `org-dblock-update' with PARAMS provided by the dynamic block."
-    (when-let* ((block-name (plist-get params :block-name))
-                (sequence (plist-get params :sequence))
-                (depth (plist-get params :depth))
-                (parent-regexp (denote-org-sequence--format-word-regexp 
sequence))
-                (parent (denote-directory-files parent-regexp))
-                (children (denote-sequence-get-relative sequence 
'all-children))
-                (family (append parent children))
-                (files (denote-org-sequence--get-files-with-max-depth depth 
family)))
-      (when block-name (insert "#+name: " block-name "\n"))
-      (denote-org--insert-sequence files)
-      (join-line))))
+    (let ((block-name (plist-get params :block-name)))
+      (when-let* ((sequence (plist-get params :sequence))
+                  (depth (plist-get params :depth))
+                  (parent-regexp (denote-org-sequence--format-word-regexp 
sequence))
+                  (parent (denote-directory-files parent-regexp))
+                  (children (denote-sequence-get-relative sequence 
'all-children))
+                  (family (append parent children))
+                  (files (denote-org-sequence--get-files-with-max-depth depth 
family)))
+        (when block-name (insert "#+name: " block-name "\n"))
+        (denote-org--insert-sequence files)
+        (join-line)))))
 
 ;; NOTE 2024-03-30: This is how the autoload is done in org.el.
 ;;;###autoload

Reply via email to