aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-01-27 19:01:49 +0200
committerEli Zaretskii2023-01-27 19:01:49 +0200
commit194bc97879d2b57545eda17dbeb0b2e46b215617 (patch)
treea7004b971c8f62243c08bab0e16ce07f7d468825
parent00629c039643a0471143205c70e8a078fc3a9d86 (diff)
downloademacs-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.texi6
-rw-r--r--lisp/simple.el6
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
751output is long). The variables @code{resize-mini-windows} and 751output 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
753Emacs should consider the output to be too long for the echo area. 753Emacs should consider the output to be too long for the echo area.
754Note that customizing @code{shell-command-dont-erase-buffer},
755described 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
756type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally 758type @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
867shell-command output. 869shell-command output.
868@end table 870@end table
869 871
872Note that if this option is non-@code{nil}, the output shown in the
873echo area could be from more than just the last command, since the
874echo area just displays a portion of the output buffer.
875
870In case the output buffer is not the current buffer, shell command 876In case the output buffer is not the current buffer, shell command
871output is appended at the end of this buffer. 877output 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.
4549Otherwise, the buffer containing the output is displayed. 4549Otherwise, the buffer containing the output is displayed.
4550Note that if `shell-command-dont-erase-buffer' is non-nil,
4551the echo area could display more than just the output of the
4552last command.
4550 4553
4551If there is output and an error, and you did not specify \"insert it 4554If there is output and an error, and you did not specify \"insert it
4552in the current buffer\", a message about the error goes at the end 4555in 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.
4830Otherwise it is displayed in the buffer named by `shell-command-buffer-name'. 4833Otherwise it is displayed in the buffer named by `shell-command-buffer-name'.
4831The output is available in that buffer in both cases. 4834The output is available in that buffer in both cases.
4835Note that if `shell-command-dont-erase-buffer' is non-nil,
4836the echo area could display more than just the output of the
4837last command.
4832 4838
4833If there is output and an error, a message about the error 4839If there is output and an error, a message about the error
4834appears at the end of the output. 4840appears at the end of the output.