branch: externals/denote-org commit ad98d4add9a5b3b1a18ba370f94b789dad0cb4e8 Merge: c393fd4ba2 811c9ded6b Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: GitHub <nore...@github.com>
Merge pull request #13 from pprevos/main Add ability to show all notes with a sequence in dynamic block --- denote-org.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/denote-org.el b/denote-org.el index 37021a3230..938d25b9b7 100644 --- a/denote-org.el +++ b/denote-org.el @@ -1027,11 +1027,13 @@ 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." (let ((block-name (plist-get params :block-name)) (depth (plist-get params :depth))) - (when-let* ((sequence (plist-get params :sequence)) - (parent (denote-sequence-get-path sequence)) - (children (denote-sequence-get-relative sequence 'all-children)) - (family (push parent children)) - (files (denote-org-sequence--get-files-with-max-depth depth family))) + (let* ((sequence (plist-get params :sequence)) + (parent (denote-sequence-get-path sequence)) + (children (denote-sequence-get-relative sequence 'all-children)) + (family (if (eq sequence "") + nil + (push 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)))))