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)

Documentation

Complete a file name in DIRS in PROJECT and visit the result.

SUGGESTED-FILENAME is a relative file name, or part of it, which is used as part of "future history".

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defun project-find-file-in (suggested-filename dirs project)
  "Complete a file name in DIRS in PROJECT and visit the result.

SUGGESTED-FILENAME is a relative file name, or part of it, which
is used as part of \"future history\"."
  (let* ((all-files (project-files project dirs))
         (completion-ignore-case read-file-name-completion-ignore-case)
         (file (funcall project-read-file-name-function
                        "Find file" all-files nil nil
                        suggested-filename)))
    (if (string= file "")
        (user-error "You didn't specify the file")
      (find-file file))))