Function: majutsu-file--read-path

majutsu-file--read-path is a natively compiled function defined in majutsu-file.el.

Signature

(majutsu-file--read-path REVSET ROOT &optional DEFAULT)

Documentation

Prompt for a file path from REVSET.

DEFAULT is the initial file choice when present in REVSET file list.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-file.el
(defun majutsu-file--read-path (revset root &optional default)
  "Prompt for a file path from REVSET.
DEFAULT is the initial file choice when present in REVSET file list."
  (let* ((paths (majutsu-file--list revset root))
         (payload (majutsu-file-candidate-data revset root paths))
         (default (or default (majutsu-file--path-at-point root))))
    (when (and default (not (member default paths)))
      (setq default nil))
    (majutsu-completing-read-payload "Find file" payload nil t nil
                                     'majutsu-file-path-history
                                     default nil nil root)))