branch: externals/denote
commit dc61708c5fa145fe0e26cd6021d47e86c3c4263f
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Do not try to search for xrefs if there are no files
---
denote.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index e3e616eaa9..4fee487a5a 100644
--- a/denote.el
+++ b/denote.el
@@ -1824,9 +1824,8 @@ This is a wrapper for
`denote-retrieve-front-matter-title-value' and
"Return list of xrefs for IDENTIFIER with their respective location.
Limit the search to text files, per `denote-directory-files' with
non-nil `text-only' parameter."
- (mapcar #'xref-match-item-location
- (xref-matches-in-files identifier
- (denote-directory-files nil nil :text-only))))
+ (when-let ((files (denote-directory-files nil nil :text-only)))
+ (mapcar #'xref-match-item-location (xref-matches-in-files identifier
files))))
(defun denote--retrieve-group-in-xrefs (identifier)
"Access location of xrefs for IDENTIFIER and group them per file.