diff options
| author | Tino Calancha | 2016-08-16 18:18:44 +0900 |
|---|---|---|
| committer | Tino Calancha | 2016-08-16 18:18:44 +0900 |
| commit | c7119916dc958eeb8e6e2ef50d4a9f262db5be32 (patch) | |
| tree | 78e4ed4d9924bc535b7e4af149218f73e873c348 /etc | |
| parent | 5783984787998f8222d66338efa61f0741466a54 (diff) | |
| download | emacs-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 'etc')
| -rw-r--r-- | etc/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -56,6 +56,16 @@ affected by this, as SGI stopped supporting IRIX in December 2013. | |||
| 56 | * Changes in Emacs 25.2 | 56 | * Changes in Emacs 25.2 |
| 57 | 57 | ||
| 58 | +++ | 58 | +++ |
| 59 | ** The new user option 'shell-command-not-erase-buffer' controls | ||
| 60 | if the output buffer is erased between shell commands; if non-nil, | ||
| 61 | the output buffer is not erased; this variable also controls where | ||
| 62 | to set the point in the output buffer: beginning of the output, | ||
| 63 | end of the buffer or save the point. | ||
| 64 | When 'shell-command-not-erase-buffer' is nil, the default value, | ||
| 65 | the behaviour of 'shell-command', 'shell-command-on-region' and | ||
| 66 | 'async-shell-command' is as usual. | ||
| 67 | |||
| 68 | +++ | ||
| 59 | ** The new user option 'mouse-select-region-move-to-beginning' | 69 | ** The new user option 'mouse-select-region-move-to-beginning' |
| 60 | controls the position of point when double-clicking mouse-1 on the end | 70 | controls the position of point when double-clicking mouse-1 on the end |
| 61 | of a parenthetical grouping or string-delimiter: the default value nil | 71 | of a parenthetical grouping or string-delimiter: the default value nil |