diff options
| author | Eli Zaretskii | 2023-01-27 19:01:49 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-01-27 19:01:49 +0200 |
| commit | 194bc97879d2b57545eda17dbeb0b2e46b215617 (patch) | |
| tree | a7004b971c8f62243c08bab0e16ce07f7d468825 | |
| parent | 00629c039643a0471143205c70e8a078fc3a9d86 (diff) | |
| download | emacs-194bc97879d2b57545eda17dbeb0b2e46b215617.tar.gz emacs-194bc97879d2b57545eda17dbeb0b2e46b215617.zip | |
Improve documentation of 'shell-command-dont-erase-buffer'
* doc/emacs/misc.texi (Single Shell):
* lisp/simple.el (shell-command, shell-command-on-region):
Document that non-nil value of 'shell-command-dont-erase-buffer'
affects what is displayed in the echo area after the command.
(Bug#61100)
| -rw-r--r-- | doc/emacs/misc.texi | 6 | ||||
| -rw-r--r-- | lisp/simple.el | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index e2764c34482..80a1b3f55ed 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -751,6 +751,8 @@ Command Output*"} (@code{shell-command-buffer-name}) buffer (if the | |||
| 751 | output is long). The variables @code{resize-mini-windows} and | 751 | output is long). The variables @code{resize-mini-windows} and |
| 752 | @code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when | 752 | @code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when |
| 753 | Emacs should consider the output to be too long for the echo area. | 753 | Emacs should consider the output to be too long for the echo area. |
| 754 | Note that customizing @code{shell-command-dont-erase-buffer}, | ||
| 755 | described below, can affect what is displayed in the echo area. | ||
| 754 | 756 | ||
| 755 | For instance, one way to decompress a file named @file{foo.gz} is to | 757 | For instance, one way to decompress a file named @file{foo.gz} is to |
| 756 | type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally | 758 | type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally |
| @@ -867,6 +869,10 @@ Restores the position of point as it was before inserting the | |||
| 867 | shell-command output. | 869 | shell-command output. |
| 868 | @end table | 870 | @end table |
| 869 | 871 | ||
| 872 | Note that if this option is non-@code{nil}, the output shown in the | ||
| 873 | echo area could be from more than just the last command, since the | ||
| 874 | echo area just displays a portion of the output buffer. | ||
| 875 | |||
| 870 | In case the output buffer is not the current buffer, shell command | 876 | In case the output buffer is not the current buffer, shell command |
| 871 | output is appended at the end of this buffer. | 877 | output is appended at the end of this buffer. |
| 872 | 878 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index aaad3217982..861fe193fb8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4547,6 +4547,9 @@ If the output is short enough to display in the echo area | |||
| 4547 | \(determined by the variable `max-mini-window-height' if | 4547 | \(determined by the variable `max-mini-window-height' if |
| 4548 | `resize-mini-windows' is non-nil), it is shown there. | 4548 | `resize-mini-windows' is non-nil), it is shown there. |
| 4549 | Otherwise, the buffer containing the output is displayed. | 4549 | Otherwise, the buffer containing the output is displayed. |
| 4550 | Note that if `shell-command-dont-erase-buffer' is non-nil, | ||
| 4551 | the echo area could display more than just the output of the | ||
| 4552 | last command. | ||
| 4550 | 4553 | ||
| 4551 | If there is output and an error, and you did not specify \"insert it | 4554 | If there is output and an error, and you did not specify \"insert it |
| 4552 | in the current buffer\", a message about the error goes at the end | 4555 | in the current buffer\", a message about the error goes at the end |
| @@ -4829,6 +4832,9 @@ If the output is short enough to display in the echo area | |||
| 4829 | `resize-mini-windows' is non-nil), it is shown there. | 4832 | `resize-mini-windows' is non-nil), it is shown there. |
| 4830 | Otherwise it is displayed in the buffer named by `shell-command-buffer-name'. | 4833 | Otherwise it is displayed in the buffer named by `shell-command-buffer-name'. |
| 4831 | The output is available in that buffer in both cases. | 4834 | The output is available in that buffer in both cases. |
| 4835 | Note that if `shell-command-dont-erase-buffer' is non-nil, | ||
| 4836 | the echo area could display more than just the output of the | ||
| 4837 | last command. | ||
| 4832 | 4838 | ||
| 4833 | If there is output and an error, a message about the error | 4839 | If there is output and an error, a message about the error |
| 4834 | appears at the end of the output. | 4840 | appears at the end of the output. |