Function: start-file-process

start-file-process is a byte-compiled function defined in simple.el.gz.

Signature

(start-file-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)

Documentation

Start a program in a subprocess. Return the process object for it.

Similar to start-process, but may invoke a file name handler based on default-directory. See Info node (elisp)Magic File Names.

This handler ought to run PROGRAM, perhaps on the local host, perhaps on a remote host that corresponds to default-directory. In the latter case, the local part of default-directory, the one produced from it by file-local-name, becomes the working directory of the process on the remote host.

PROGRAM and PROGRAM-ARGS might be file names. They are not objects of file name handler invocation, so they need to be obtained by calling file-local-name, in case they are remote file names.

File name handlers might not support pty association, if PROGRAM is nil.

This function has :around advice: start-file-process@with-editor-process-filter.

View in manual

Probably introduced at or before Emacs version 23.1.

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun start-file-process (name buffer program &rest program-args)
  "Start a program in a subprocess.  Return the process object for it.

Similar to `start-process', but may invoke a file name handler based on
`default-directory'.  See Info node `(elisp)Magic File Names'.

This handler ought to run PROGRAM, perhaps on the local host,
perhaps on a remote host that corresponds to `default-directory'.
In the latter case, the local part of `default-directory', the one
produced from it by `file-local-name', becomes the working directory
of the process on the remote host.

PROGRAM and PROGRAM-ARGS might be file names.  They are not
objects of file name handler invocation, so they need to be obtained
by calling `file-local-name', in case they are remote file names.

File name handlers might not support pty association, if PROGRAM is nil."
  (let ((fh (find-file-name-handler default-directory 'start-file-process)))
    (if fh (apply fh 'start-file-process name buffer program program-args)
      (apply 'start-process name buffer program program-args))))