summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Quintana <lmq10@protonmail.com>2025-01-29 12:45:43 -0300
committerGitHub <noreply@github.com>2025-01-29 12:45:43 -0300
commit4f94a80cf74a2b9a2c615b29700d84f1d7d289e6 (patch)
tree22eddc87c5294316d7db1e0d06fbc6725979ffc5
parentac701b674dd0075e5732d31a3e5c3c832f7f7308 (diff)
parent7b398fd5fbc82c47c17c4eec40568e39ce155fe5 (diff)
Merge pull request #1 from grettke/main
Add support for handling `denote-directory-files' returning nil
-rw-r--r--denote-search.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/denote-search.el b/denote-search.el
index 28334d3..4c59dd1 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)