Clarify where the shell-command output goes

* lisp/simple.el (shell-command):
* doc/emacs/misc.texi (Single Shell): Clarify where the output
goes if the specified buffer isn't the current one (bug#40896).
This commit is contained in:
Michael Albinus 2022-01-28 16:32:15 +01:00 committed by Lars Ingebrigtsen
parent 12d3c4831a
commit 87c2367011
2 changed files with 7 additions and 0 deletions

View file

@ -856,6 +856,9 @@ Restores the position of point as it was before inserting the
shell-command output.
@end table
In case the output buffer is not the current buffer, shell command
output is appended at the end of this buffer.
@node Interactive Shell
@subsection Interactive Subshell

View file

@ -4092,6 +4092,10 @@ interactively when the prefix argument is given), insert the
output in current buffer after point leaving mark after it. This
cannot be done asynchronously.
If OUTPUT-BUFFER is a buffer or buffer name different from the
current buffer, instead of outputting at point in that buffer,
the output will be appended at the end of that buffer.
The user option `shell-command-dont-erase-buffer', which see, controls
whether the output buffer is erased and where to put point after
the shell command.