Function: project-find-file
project-find-file is an autoloaded, interactive and byte-compiled
function defined in project.el.gz.
Signature
(project-find-file &optional INCLUDE-ALL)
Documentation
Visit a file (with completion) in the current project.
The filename at point (determined by thing-at-point), if any,
is available as part of "future history".
If INCLUDE-ALL is non-nil, or with prefix argument when called
interactively, include all files under the project root, except
for VCS directories listed in vc-directory-exclusion-list.
Probably introduced at or before Emacs version 25.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;;;###autoload
(defun project-find-file (&optional include-all)
"Visit a file (with completion) in the current project.
The filename at point (determined by `thing-at-point'), if any,
is available as part of \"future history\".
If INCLUDE-ALL is non-nil, or with prefix argument when called
interactively, include all files under the project root, except
for VCS directories listed in `vc-directory-exclusion-list'."
(interactive "P")
(let* ((pr (project-current t))
(root (project-root pr))
(dirs (list root)))
(project-find-file-in
(or (thing-at-point 'filename)
(and buffer-file-name (file-relative-name buffer-file-name root)))
dirs pr include-all)))