aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2020-05-16 14:04:07 +0200
committerMichael Albinus2020-05-16 14:04:07 +0200
commitbbbab82a7117e08a77433f5ad39b34f5e03a014c (patch)
tree52ce224c6f704873ebbb2c50d9203592c2baea5f /doc
parentdba8f3783b209fef5be2589528ed43a99a8bab6a (diff)
downloademacs-bbbab82a7117e08a77433f5ad39b34f5e03a014c.tar.gz
emacs-bbbab82a7117e08a77433f5ad39b34f5e03a014c.zip
Introduce process-file-return-signal-string
* doc/lispref/processes.texi (Synchronous Processes): Describe `process-file-return-signal-string'. * doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers. (Remote processes): Describe `process-file-return-signal-string' and $INSIDE_EMACS. * etc/NEWS: Describe `process-file-return-signal-string'. Fix typos. * lisp/simple.el (process-file-return-signal-string): New user option. * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Use it. * lisp/net/tramp.el (tramp-get-signal-strings): New defun. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/processes.texi16
-rw-r--r--doc/misc/tramp.texi47
2 files changed, 49 insertions, 14 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index c6e735a9b1e..22c50936185 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -477,6 +477,22 @@ You should only ever change this variable with a let-binding; never
477with @code{setq}. 477with @code{setq}.
478@end defvar 478@end defvar
479 479
480@defopt process-file-return-signal-string
481This user option indicates whether a call of @code{process-file}
482returns a string describing the signal interrupting a remote process.
483
484When a process returns an exit code greater than 128, it is
485interpreted as a signal. @code{process-file} requires to return a
486string describing this signal.
487
488Since there are processes violating this rule, returning exit codes
489greater than 128 which are not bound to a signal, @code{process-file}
490returns always the exit code as natural number for remote processes.
491Setting this user option to non-nil forces @code{process-file} to
492interpret such exit codes as signals, and to return a corresponding
493string.
494@end defopt
495
480@defun call-process-region start end program &optional delete destination display &rest args 496@defun call-process-region start end program &optional delete destination display &rest args
481This function sends the text from @var{start} to @var{end} as 497This function sends the text from @var{start} to @var{end} as
482standard input to a process running @var{program}. It deletes the text 498standard input to a process running @var{program}. It deletes the text
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 0b13c17dbcf..d1688deb1b7 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -318,14 +318,14 @@ behind the scenes when you open a file with @value{tramp}.
318@uref{https://ftp.gnu.org/gnu/tramp/}. The version number of 318@uref{https://ftp.gnu.org/gnu/tramp/}. The version number of
319@value{tramp} can be obtained by the variable @code{tramp-version}. 319@value{tramp} can be obtained by the variable @code{tramp-version}.
320For released @value{tramp} versions, this is a three-number string 320For released @value{tramp} versions, this is a three-number string
321like ``2.4.2''. 321like ``2.4.3''.
322 322
323A @value{tramp} release, which is packaged with Emacs, could differ 323A @value{tramp} release, which is packaged with Emacs, could differ
324slightly from the corresponding standalone release. This is because 324slightly from the corresponding standalone release. This is because
325it isn't always possible to synchronize release dates between Emacs 325it isn't always possible to synchronize release dates between Emacs
326and @value{tramp}. Such version numbers have the Emacs version number 326and @value{tramp}. Such version numbers have the Emacs version number
327as suffix, like ``2.3.5.26.3''. This means @w{@value{tramp} 2.3.5} as 327as suffix, like ``2.4.3.27.1''. This means @w{@value{tramp} 2.4.3} as
328integrated in @w{Emacs 26.3}. A complete list of @value{tramp} 328integrated in @w{Emacs 27.1}. A complete list of @value{tramp}
329versions packaged with Emacs can be retrieved by 329versions packaged with Emacs can be retrieved by
330 330
331@vindex customize-package-emacs-version-alist 331@vindex customize-package-emacs-version-alist
@@ -337,12 +337,12 @@ versions packaged with Emacs can be retrieved by
337ELPA} package. Besides the standalone releases, further minor version 337ELPA} package. Besides the standalone releases, further minor version
338of @value{tramp} will appear on GNU ELPA, until the next @value{tramp} 338of @value{tramp} will appear on GNU ELPA, until the next @value{tramp}
339release appears. These minor versions have a four-number string, like 339release appears. These minor versions have a four-number string, like
340``2.4.2.1''. 340``2.4.3.1''.
341 341
342@value{tramp} development versions are available on Git servers. 342@value{tramp} development versions are available on Git servers.
343Development versions contain new and incomplete features. The 343Development versions contain new and incomplete features. The
344development version of @value{tramp} is always the version number of 344development version of @value{tramp} is always the version number of
345the next release, plus the suffix ``-pre'', like ``2.4.3-pre''. 345the next release, plus the suffix ``-pre'', like ``2.4.4-pre''.
346 346
347One way to obtain @value{tramp} from Git server is to visit the 347One way to obtain @value{tramp} from Git server is to visit the
348Savannah project page at the following URL and then clicking on the 348Savannah project page at the following URL and then clicking on the
@@ -2315,7 +2315,7 @@ string of that environment variable looks always like
2315@example 2315@example
2316@group 2316@group
2317echo $INSIDE_EMACS 2317echo $INSIDE_EMACS
2318@result{} 26.2,tramp:2.3.4 2318@result{} 27.1,tramp:2.4.3
2319@end group 2319@end group
2320@end example 2320@end example
2321 2321
@@ -3050,6 +3050,17 @@ host when the variable @code{default-directory} is remote:
3050@end group 3050@end group
3051@end lisp 3051@end lisp
3052 3052
3053@vindex process-file-return-signal-string
3054@code{process-file} shall return either the exit code of the process,
3055or a string describing the signal, when the process has been
3056interrupted. Since it cannot be determined reliably whether a remote
3057process has been interrupted, @code{process-file} returns always the
3058exit code. When the user option
3059@code{process-file-return-signal-string} is non-nil,
3060@code{process-file} regards all exit codes greater than 128 as an
3061indication that the process has been interrupted, and returns a
3062respective string.
3063
3053Remote processes do not apply to @acronym{GVFS} (see @ref{GVFS-based 3064Remote processes do not apply to @acronym{GVFS} (see @ref{GVFS-based
3054methods}) because the remote file system is mounted on the local host 3065methods}) because the remote file system is mounted on the local host
3055and @value{tramp} just accesses by changing the 3066and @value{tramp} just accesses by changing the
@@ -3057,9 +3068,17 @@ and @value{tramp} just accesses by changing the
3057 3068
3058@value{tramp} starts a remote process when a command is executed in a 3069@value{tramp} starts a remote process when a command is executed in a
3059remote file or directory buffer. As of now, these packages have been 3070remote file or directory buffer. As of now, these packages have been
3060integrated to work with @value{tramp}: @file{compile.el} (commands 3071integrated to work with @value{tramp}: @file{shell.el},
3061like @code{compile} and @code{grep}) and @file{gud.el} (@code{gdb} or 3072@file{eshell.el}, @file{compile.el} (commands like @code{compile} and
3062@code{perldb}). 3073@code{grep}) and @file{gud.el} (@code{gdb} or @code{perldb}).
3074
3075@vindex INSIDE_EMACS@r{, environment variable}
3076@value{tramp} always modifies the @env{INSIDE_EMACS} environment
3077variable for remote processes. Per default, this environment variable
3078shows the Emacs version. @value{tramp} adds its own version string,
3079so it looks like @samp{27.1,tramp:2.4.3.1}. However, other packages
3080might also add their name to this environment variable, like
3081@samp{27.1,comint,tramp:2.4.3.1}.
3063 3082
3064For @value{tramp} to find the command on the remote, it must be 3083For @value{tramp} to find the command on the remote, it must be
3065accessible through the default search path as setup by @value{tramp} 3084accessible through the default search path as setup by @value{tramp}
@@ -3254,7 +3273,7 @@ variables.
3254@vindex async-shell-command-width 3273@vindex async-shell-command-width
3255@vindex COLUMNS@r{, environment variable} 3274@vindex COLUMNS@r{, environment variable}
3256If Emacs supports the variable @code{async-shell-command-width} (since 3275If Emacs supports the variable @code{async-shell-command-width} (since
3257@w{Emacs 27.1}), @value{tramp} cares about its value for asynchronous 3276@w{Emacs 27}), @value{tramp} cares about its value for asynchronous
3258shell commands. It specifies the number of display columns for 3277shell commands. It specifies the number of display columns for
3259command output. For synchronous shell commands, a similar effect can 3278command output. For synchronous shell commands, a similar effect can
3260be achieved by adding the environment variable @env{COLUMNS} to 3279be achieved by adding the environment variable @env{COLUMNS} to
@@ -3741,7 +3760,7 @@ row are possible, like @file{/path/to/dir/file.tar.gz.uu/dir/file}.
3741 3760
3742@vindex tramp-archive-all-gvfs-methods 3761@vindex tramp-archive-all-gvfs-methods
3743An archive file name could be a remote file name, as in 3762An archive file name could be a remote file name, as in
3744@file{/ftp:anonymous@@ftp.gnu.org:/gnu/tramp/tramp-2.3.2.tar.gz/INSTALL}. 3763@file{/ftp:anonymous@@ftp.gnu.org:/gnu/tramp/tramp-2.4.3.tar.gz/INSTALL}.
3745Since all file operations are mapped internally to @acronym{GVFS} 3764Since all file operations are mapped internally to @acronym{GVFS}
3746operations, remote file names supported by @code{tramp-gvfs} perform 3765operations, remote file names supported by @code{tramp-gvfs} perform
3747better, because no local copy of the file archive must be downloaded 3766better, because no local copy of the file archive must be downloaded
@@ -3752,7 +3771,7 @@ the similar @samp{/scp:user@@host:...}. See the constant
3752 3771
3753If @code{url-handler-mode} is enabled, archives could be visited via 3772If @code{url-handler-mode} is enabled, archives could be visited via
3754URLs, like 3773URLs, like
3755@file{https://ftp.gnu.org/gnu/tramp/tramp-2.3.2.tar.gz/INSTALL}. This 3774@file{https://ftp.gnu.org/gnu/tramp/tramp-2.4.3.tar.gz/INSTALL}. This
3756allows complex file operations like 3775allows complex file operations like
3757 3776
3758@lisp 3777@lisp
@@ -3760,8 +3779,8 @@ allows complex file operations like
3760(progn 3779(progn
3761 (url-handler-mode 1) 3780 (url-handler-mode 1)
3762 (ediff-directories 3781 (ediff-directories
3763 "https://ftp.gnu.org/gnu/tramp/tramp-2.3.1.tar.gz/tramp-2.3.1" 3782 "https://ftp.gnu.org/gnu/tramp/tramp-2.4.2.tar.gz/tramp-2.4.2"
3764 "https://ftp.gnu.org/gnu/tramp/tramp-2.3.2.tar.gz/tramp-2.3.2" "")) 3783 "https://ftp.gnu.org/gnu/tramp/tramp-2.4.3.tar.gz/tramp-2.4.3" ""))
3765@end group 3784@end group
3766@end lisp 3785@end lisp
3767 3786