Function: project-find-file-in
project-find-file-in is a byte-compiled function defined in
project.el.gz.
Signature
(project-find-file-in SUGGESTED-FILENAME DIRS PROJECT &optional INCLUDE-ALL)
Documentation
Complete a file name in DIRS in PROJECT and visit the result.
SUGGESTED-FILENAME is a file name, or part of it, which is used as part of "future history".
If INCLUDE-ALL is non-nil, or with prefix argument when called
interactively, include all files from DIRS, except for VCS
directories listed in vc-directory-exclusion-list.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defun project-find-file-in (suggested-filename dirs project &optional include-all)
"Complete a file name in DIRS in PROJECT and visit the result.
SUGGESTED-FILENAME is a file name, or part of it, which
is used as part of \"future history\".
If INCLUDE-ALL is non-nil, or with prefix argument when called
interactively, include all files from DIRS, except for VCS
directories listed in `vc-directory-exclusion-list'."
(let* ((vc-dirs-ignores (mapcar
(lambda (dir)
(concat dir "/"))
vc-directory-exclusion-list))
(all-files
(if include-all
(mapcan
(lambda (dir) (project--files-in-directory dir vc-dirs-ignores))
dirs)
(project-files project dirs)))
(completion-ignore-case read-file-name-completion-ignore-case)
(default-directory (project-root project))
(file (project--read-file-name
project "Find file"
all-files nil 'file-name-history
suggested-filename)))
(if (string= file "")
(user-error "You didn't specify the file")
(find-file file))))