branch: externals/denote
commit fb375dc623ddfc6ce5e96659d8124b17af49c2f5
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make denote-org-extras--get-backlinks-for-heading check all prerequisites
---
denote-org-extras.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/denote-org-extras.el b/denote-org-extras.el
index 9ce6f0f3b8..0994d3c3db 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -143,10 +143,9 @@ If FILE is nil, use the variable `buffer-file-name'."
(defun denote-org-extras--get-backlinks-for-heading (file-and-heading-id)
"Get backlinks to FILE-AND-HEADING-ID as a list of strings."
- (when-let ((xref-alist (xref--analyze
- (xref-matches-in-files
- file-and-heading-id
- (denote-directory-files nil :omit-current
:text-only)))))
+ (when-let ((files (denote-directory-files nil :omit-current :text-only))
+ (matches-in-files (xref-matches-in-files file-and-heading-id
files))
+ (xref-alist (xref--analyze matches-in-files)))
(mapcar
(lambda (x)
(denote-get-file-name-relative-to-denote-directory (car x)))