Function: hypb:filter-directories
hypb:filter-directories is a byte-compiled function defined in
hypb.el.
Signature
(hypb:filter-directories FILE-REGEXP &rest DIRS)
Documentation
Filter files to those matching FILE-REGEXP from rest of DIRS (recursively).
Also filters out any files matching completion-ignored-extensions or
ending with # or ~.
Return a flattened list of all matching files.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hypb.el
(defun hypb:filter-directories (file-regexp &rest dirs)
"Filter files to those matching FILE-REGEXP from rest of DIRS (recursively).
Also filters out any files matching `completion-ignored-extensions' or
ending with # or ~.
Return a flattened list of all matching files."
(setq file-regexp (hypb:glob-to-regexp file-regexp))
(setq dirs (hypb:readable-directories dirs))
(delq nil (mapcar (lambda (f)
(unless (string-match-p
(concat (regexp-opt (append completion-ignored-extensions '("#" "~"))
'paren) "$") f)
f))
(apply #'nconc (mapcar (lambda (dir) (directory-files-recursively dir file-regexp))
dirs)))))