aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTino Calancha2016-08-16 18:18:44 +0900
committerTino Calancha2016-08-16 18:18:44 +0900
commitc7119916dc958eeb8e6e2ef50d4a9f262db5be32 (patch)
tree78e4ed4d9924bc535b7e4af149218f73e873c348 /doc
parent5783984787998f8222d66338efa61f0741466a54 (diff)
downloademacs-c7119916dc958eeb8e6e2ef50d4a9f262db5be32.tar.gz
emacs-c7119916dc958eeb8e6e2ef50d4a9f262db5be32.zip
Allow not erase output buffer in shell commands
* lisp/simple.el (shell-command-not-erase-buffer): New option to allow not erasing the output buffer between shell commands. Defaults to nil. (shell-command-on-region): Use it. (shell-command--save-pos-or-erase): New defun; store a buffer position if 'shell-command-not-erase-buffer' is non-nil; otherwise erase the output buffer of the shell command. (shell-command, shell-command-on-region): Use it. (shell-command--set-point-after-cmd): New defun; if 'shell-command-not-erase-buffer' is non-nil, set point in the output buffer to the position in 'shell-command-saved-pos'. (shell-command-sentinel, shell-command-on-region): Use it. * doc/emacs/misc.texi (shell-command-not-erase-buffer): Document this feature in the manual. ; * etc/NEWS: Add entry for this new feature. See discussion on: http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00610.html
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/misc.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 94e1f198f2b..acddb7a8f70 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -771,6 +771,14 @@ the output buffer. But if you change the value of the variable
771@code{shell-command-default-error-buffer} to a string, error output is 771@code{shell-command-default-error-buffer} to a string, error output is
772inserted into a buffer of that name. 772inserted into a buffer of that name.
773 773
774@vindex shell-command-not-erase-buffer
775 By default, the output buffer is erased between shell commands.
776If you change the value of the variable
777@code{shell-command-not-erase-buffer} to a non-@code{nil} value,
778the output buffer is not erased. This variable also controls where to
779set the point in the output buffer after the command completes; see the
780documentation of the variable for details.
781
774@node Interactive Shell 782@node Interactive Shell
775@subsection Interactive Subshell 783@subsection Interactive Subshell
776 784