mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Improve make-process in Tramp
* doc/misc/tramp.texi (Remote processes): Remove INSIDE_EMACS restriction. (Frequently Asked Questions, External packages): Add indices. * etc/NEWS: 'start-process-shell-command' and 'start-file-process-shell-command' do not support the old calling conventions any longer. * lisp/subr.el (start-process-shell-command) (start-file-process-shell-command): Remove old calling conventions. * lisp/net/tramp-compat.el (remote-file-error): Remove, it isn't necessary. * lisp/net/tramp.el (tramp-handle-make-process): Remove special shell handling. Support environment variables. * test/lisp/net/tramp-tests.el (tramp--test--deftest-direct-async-process): Skip for mock method. (tramp--test-async-shell-command): Suppress `shell-command-sentinel'. (tramp-test32-shell-command, tramp-test33-environment-variables): Adapt tests. (tramp-test32-shell-command-direct-async) (tramp-test33-environment-variables-direct-async): New tests.
This commit is contained in:
parent
1a0a11f7d2
commit
ecb5ebf156
6 changed files with 100 additions and 79 deletions
19
lisp/subr.el
19
lisp/subr.el
|
|
@ -3560,7 +3560,7 @@ Do nothing if FACE is nil."
|
|||
|
||||
;;;; Synchronous shell commands.
|
||||
|
||||
(defun start-process-shell-command (name buffer &rest args)
|
||||
(defun start-process-shell-command (name buffer command)
|
||||
"Start a program in a subprocess. Return the process object for it.
|
||||
NAME is name for process. It is modified if necessary to make it unique.
|
||||
BUFFER is the buffer (or buffer name) to associate with the process.
|
||||
|
|
@ -3568,27 +3568,18 @@ BUFFER is the buffer (or buffer name) to associate with the process.
|
|||
an output stream or filter function to handle the output.
|
||||
BUFFER may be also nil, meaning that this process is not associated
|
||||
with any buffer
|
||||
COMMAND is the shell command to run.
|
||||
|
||||
An old calling convention accepted any number of arguments after COMMAND,
|
||||
which were just concatenated to COMMAND. This is still supported but strongly
|
||||
discouraged."
|
||||
(declare (advertised-calling-convention (name buffer command) "23.1"))
|
||||
COMMAND is the shell command to run."
|
||||
;; We used to use `exec' to replace the shell with the command,
|
||||
;; but that failed to handle (...) and semicolon, etc.
|
||||
(start-process name buffer shell-file-name shell-command-switch
|
||||
(mapconcat 'identity args " ")))
|
||||
(start-process name buffer shell-file-name shell-command-switch command))
|
||||
|
||||
(defun start-file-process-shell-command (name buffer &rest args)
|
||||
(defun start-file-process-shell-command (name buffer command)
|
||||
"Start a program in a subprocess. Return the process object for it.
|
||||
Similar to `start-process-shell-command', but calls `start-file-process'."
|
||||
(declare (advertised-calling-convention (name buffer command) "23.1"))
|
||||
;; On remote hosts, the local `shell-file-name' might be useless.
|
||||
(with-connection-local-variables
|
||||
(start-file-process
|
||||
name buffer
|
||||
shell-file-name shell-command-switch
|
||||
(mapconcat 'identity args " "))))
|
||||
name buffer shell-file-name shell-command-switch command)))
|
||||
|
||||
(defun call-process-shell-command (command &optional infile buffer display
|
||||
&rest args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue