branch: externals/denote-search
commit 4f94a80cf74a2b9a2c615b29700d84f1d7d289e6
Merge: ac701b674d 7b398fd5fb
Author: Lucas Quintana <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #1 from grettke/main
Add support for handling `denote-directory-files' returning nil
---
denote-search.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/denote-search.el b/denote-search.el
index 28334d3644..4c59dd1d8b 100644
--- a/denote-search.el
+++ b/denote-search.el
@@ -238,7 +238,8 @@ The results are populated in a buffer whose major mode is
(xref--analyze
(xref-matches-in-files
query
- (or set (denote-directory-files nil nil :text-only))))))
+ (or set (denote-directory-files nil nil :text-only)
+ (user-error "Sorry, the directory `%s' doesn't have any text
files to search." denote-directory))))))
(or xref-alist (user-error "No matches for `%s'" query))
;; Set internal variables for last set of files and last query
(setq denote-search--last-files nil)