Dmitry Gutov writes: > On 01/11/2023 15:12, Philip Kaludercic wrote: >> One idea would be to just simplify the entire implementation by relying >> on directory-files and directory-files-recursively. Say something like >> this: > > Looks, good, just once thing: > >> + (directory-files-recursively dir "" t #'file-directory-p) > > The argument PREDICATE is not in Emacs 26.1 (which should remain > compatible). But it doesn't help anyway, because that predicate is > only used to determine whether to recurse into a subdirectory, and not > to filter out files. So the full list of all files is generated > anyway. OK, here is the updated patch: