Only consider items with id in directory files

This way we avoid other random files that may exist in the directory,
such as .dir-locals.el
This commit is contained in:
Protesilaos Stavrou 2022-06-18 07:28:18 +03:00
parent aab484d617
commit ecaaa6bb63
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -293,7 +293,8 @@ names that are relative to the variable `denote-directory'."
(default-directory dir))
(seq-remove
(lambda (file)
(file-directory-p file))
(or (not (string-match-p denote--id-regexp file))
(file-directory-p file)))
(directory-files dir absolute directory-files-no-dot-files-regexp t))))
(defun denote--directory-files-matching-regexp (regexp &optional no-check-current)