[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote-org c7579f620d: Refactor denote-org-dblock--get-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote-org c7579f620d: Refactor denote-org-dblock--get-missing-links |
Date: |
Tue, 29 Apr 2025 03:58:58 -0400 (EDT) |
branch: externals/denote-org
commit c7579f620da02f356201f9f9b512efbec413c37b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refactor denote-org-dblock--get-missing-links
I removed the denote-link--expand-identifiers from denote.el because
we do not need it for this case. I also made denote-link-return-links
accept an optional FILES parameter, which is useful in this case.
The message we were producing before seems unnecessary, given that
this is done in the context of a dynamic blocks, whose results are
displayed right there. The user already gets the feedback they need.
---
denote-org.el | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/denote-org.el b/denote-org.el
index 8d98f7b4c7..fe29b22d39 100644
--- a/denote-org.el
+++ b/denote-org.el
@@ -411,12 +411,9 @@ Also see `denote-org-dblock--files-missing-only'."
"Return list of missing links to all notes matching REGEXP.
Missing links are those for which REGEXP does not have a match in
the current buffer."
- (let ((found-files (denote-directory-files regexp :omit-current))
- (linked-files (denote-link--expand-identifiers
denote-org-link-in-context-regexp)))
- (if-let* ((final-files (seq-difference found-files linked-files)))
- final-files
- (message "All links matching `%s' are present" regexp)
- '())))
+ (when-let* ((all-files (denote-directory-files regexp :omit-current))
+ (linked-files (denote-link-return-links nil all-files)))
+ (seq-difference all-files linked-files)))
(defun denote-org-dblock--files-missing-only (files-matching-regexp &optional
sort-by-component reverse)
"Return list of missing links to FILES-MATCHING-REGEXP.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/denote-org c7579f620d: Refactor denote-org-dblock--get-missing-links,
ELPA Syncer <=