Function: project-or-external-find-file
project-or-external-find-file is an autoloaded, interactive and
byte-compiled function defined in project.el.gz.
Signature
(project-or-external-find-file &optional INCLUDE-ALL)
Documentation
Visit a file (with completion) in the current project or external roots.
The filename at point (determined by thing-at-point), if any,
is available as part of "future history". If none, the current
buffer's file name is used.
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 29.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;;;###autoload
(defun project-or-external-find-file (&optional include-all)
"Visit a file (with completion) in the current project or external roots.
The filename at point (determined by `thing-at-point'), if any,
is available as part of \"future history\". If none, the current
buffer's file name is used.
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")
(defvar project-file-history-behavior)
(let* ((pr (project-current t))
(dirs (cons
(project-root pr)
(project-external-roots pr)))
(project-file-history-behavior t))
(project-find-file-in
(delq nil (list (and buffer-file-name (project--find-default-from
buffer-file-name pr))
(thing-at-point 'filename)))
dirs pr include-all)))