From: Glenn Morris Date: Mon, 31 Dec 2018 01:02:40 +0000 (-0800) Subject: Merge from origin/emacs-26 X-Git-Tag: emacs-27.0.90~3896 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=433b6a74ec73608ff06106daee4f53c5175d5297;p=emacs.git Merge from origin/emacs-26 82c82b1 (origin/emacs-26) In user manual fix value of default frame h... 2e8825d Improve documentation of 'file-local-name' and related APIs 11f0635 ; Remove comment in esh-proc.el # Conflicts: # lisp/simple.el --- 433b6a74ec73608ff06106daee4f53c5175d5297 diff --cc doc/lispref/processes.texi index 88b0382b7d1,f2b3a9c096b..13544298b6e --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@@ -842,9 -819,14 +844,14 @@@ In the latter case, the local part of @ the working directory of the process. This function does not try to invoke file name handlers for - @var{program} or for the rest of @var{args}. + @var{program} or for the rest of @var{args}. For that reason, if + @var{program} or any of @var{args} use the remote-file syntax + (@pxref{Magic File Names}), they must be converted either to file + names relative to @code{default-directory}, or to names that identify + the files locally on the remote host, by running them through + @code{file-local-name}. -Depending on the implementation of the file handler, it might not be +Depending on the implementation of the file name handler, it might not be possible to apply @code{process-filter} or @code{process-sentinel} to the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}. diff --cc lisp/simple.el index 0281464c61f,8671fb91747..241f5ece3d0 --- a/lisp/simple.el +++ b/lisp/simple.el @@@ -3889,11 -3863,11 +3889,11 @@@ interactively, this is t. (with-output-to-string (with-current-buffer standard-output - (process-file shell-file-name nil t nil shell-command-switch command)))) + (shell-command command t)))) (defun process-file (program &optional infile buffer display &rest args) - "Process files synchronously in a separate process. + "Process files synchronously in a separate process that runs PROGRAM. -Similar to `call-process', but may invoke a file handler based on +Similar to `call-process', but may invoke a file name handler based on `default-directory'. The current working directory of the subprocess is `default-directory'. @@@ -3941,12 -3918,15 +3944,15 @@@ Similar to `start-process', but may inv 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' becomes - the working directory of the process. + 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. File name handlers might not - support pty association, if PROGRAM is nil." -objects of file handler invocation, so they need to be obtained ++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 handlers might not support pty association, if PROGRAM is nil." ++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))))