emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote dc61708c5f 1/8: Do not try to search for xrefs i


From: ELPA Syncer
Subject: [elpa] externals/denote dc61708c5f 1/8: Do not try to search for xrefs if there are no files
Date: Thu, 25 Jul 2024 03:58:08 -0400 (EDT)

branch: externals/denote
commit dc61708c5fa145fe0e26cd6021d47e86c3c4263f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]