@item :file-handler @var{file-handler}
If @var{file-handler} is non-@code{nil}, then look for a file name
handler for the current buffer's @code{default-directory}, and invoke
-that file handler to make the process. If there is no such handler,
-proceed as if @var{file-handler} were @code{nil}.
+that file name handler to make the process. If there is no such
+handler, proceed as if @var{file-handler} were @code{nil}.
@end table
The original argument list, modified with the actual connection
The current working directory of the subprocess is set to the current
buffer's value of @code{default-directory} if that is local (as
-determined by `unhandled-file-name-directory'), or "~" otherwise. If
-you want to run a process in a remote directory, pass
-@code{:file-handler t} to @code{make-process}.
+determined by @code{unhandled-file-name-directory}), or @file{~}
+otherwise. If you want to run a process in a remote directory, pass
+@code{:file-handler t} to @code{make-process}. In that case, the
+current working directory is the local name component of
+@code{default-directory} (as determined by @code{file-local-name}).
+
+Depending on the implementation of the file name handler, it might not
+be possible to apply @var{filter} or @var{sentinel} to the resulting
+process object. @xref{Filter Functions}, and @ref{Sentinels}.
+
+Some file name handlers may not support @code{make-process}. In such
+cases, this function does nothing and returns @code{nil}.
@end defun
@defun make-pipe-process &rest args
;; We can handle process-file in a restricted way (just for chown).
;; Nothing possible for `start-file-process'.
+(put 'exec-path 'ange-ftp 'ignore)
+(put 'make-process 'ange-ftp 'ignore)
(put 'process-file 'ange-ftp 'ange-ftp-process-file)
(put 'start-file-process 'ange-ftp 'ignore)
(put 'shell-command 'ange-ftp 'ange-ftp-shell-command)
-(put 'exec-path 'ange-ftp 'ignore)
\f
;;; Define ways of getting at unmodified Emacs primitives,
;;; turning off our handler.
(make-directory . tramp-adb-handle-make-directory)
(make-directory-internal . ignore)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-handle-make-symbolic-link)
(process-file . tramp-adb-handle-process-file)
(rename-file . tramp-adb-handle-rename-file)
(make-directory . tramp-archive-handle-not-implemented)
(make-directory-internal . tramp-archive-handle-not-implemented)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-archive-handle-not-implemented)
(process-file . ignore)
(rename-file . tramp-archive-handle-not-implemented)
(make-directory . tramp-gvfs-handle-make-directory)
(make-directory-internal . ignore)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-handle-make-symbolic-link)
(process-file . ignore)
(rename-file . tramp-gvfs-handle-rename-file)
(make-directory . tramp-rclone-handle-make-directory)
(make-directory-internal . ignore)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-handle-make-symbolic-link)
(process-file . ignore)
(rename-file . tramp-rclone-handle-rename-file)
(make-directory . tramp-sh-handle-make-directory)
;; `make-directory-internal' performed by default handler.
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-sh-handle-make-symbolic-link)
(process-file . tramp-sh-handle-process-file)
(rename-file . tramp-sh-handle-rename-file)
(make-directory . tramp-smb-handle-make-directory)
(make-directory-internal . tramp-smb-handle-make-directory-internal)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-smb-handle-make-symbolic-link)
(process-file . tramp-smb-handle-process-file)
(rename-file . tramp-smb-handle-rename-file)
(make-directory . tramp-sudoedit-handle-make-directory)
(make-directory-internal . ignore)
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
+ (make-process . ignore)
(make-symbolic-link . tramp-sudoedit-handle-make-symbolic-link)
(process-file . ignore)
(rename-file . tramp-sudoedit-handle-rename-file)
;; Emacs 26+ only.
make-nearby-temp-file temporary-file-directory
;; Emacs 27+ only.
- exec-path))
+ exec-path make-process))
default-directory)
;; PROC.
((member operation
short-f (concat ediff-temp-file-prefix short-p)
f (cond (given-file)
((find-file-name-handler f 'insert-file-contents)
- ;; to thwart file handlers in write-region, e.g., if file
- ;; name ends with .Z or .gz
- ;; This is needed so that patches produced by ediff will
+ ;; to thwart file name handlers in write-region,
+ ;; e.g., if file name ends with .Z or .gz
+ ;; This is needed so that patches produced by ediff will
;; have more meaningful names
(ediff-make-empty-tmp-file short-f))
(prefix
:file-handler FILE-HANDLER -- If FILE-HANDLER is non-nil, then look
for a file name handler for the current buffer's `default-directory'
-and invoke that file handler to make the process. If there is no
+and invoke that file name handler to make the process. If there is no
such handler, proceed as if FILE-HANDLER were nil.
usage: (make-process &rest ARGS) */)
(ert-deftest make-process/file-handler/found ()
"Check that the ‘:file-handler’ argument of ‘make-process’
-works as expected if a file handler is found."
+works as expected if a file name handler is found."
(let ((file-handler-calls 0))
(cl-flet ((file-handler
(&rest args)
(ert-deftest make-process/file-handler/not-found ()
"Check that the ‘:file-handler’ argument of ‘make-process’
-works as expected if no file handler is found."
+works as expected if no file name handler is found."
(let ((file-name-handler-alist ())
(default-directory invocation-directory)
(program (expand-file-name invocation-name invocation-directory)))
(ert-deftest make-process/file-handler/disable ()
"Check ‘make-process’ works as expected if it shouldn’t use the
-file handler."
+file name handler."
(let ((file-name-handler-alist (list (cons (rx bos "test-handler:")
#'process-tests--file-handler)))
(default-directory "test-handler:/dir/")
(defun process-tests--file-handler (operation &rest _args)
(cl-ecase operation
(unhandled-file-name-directory "/")
- (make-process (ert-fail "file handler called unexpectedly"))))
+ (make-process (ert-fail "file name handler called unexpectedly"))))
(put #'process-tests--file-handler 'operations
'(unhandled-file-name-directory make-process))