diff options
| author | Noam Postavsky | 2019-06-01 12:40:11 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-06-01 17:48:43 -0400 |
| commit | fb314ba3ad3619123b3d41b1dd65dcc569ad1e51 (patch) | |
| tree | 256057921055dce235b72fce820f4ac3f3edfabf | |
| parent | 04f13a5d9bc19cfe0382e4257f1a1d856aa354ed (diff) | |
| download | emacs-fb314ba3ad3619123b3d41b1dd65dcc569ad1e51.tar.gz emacs-fb314ba3ad3619123b3d41b1dd65dcc569ad1e51.zip | |
Don't recommend insert-before-markers in process filters
See <https://lists.gnu.org/r/emacs-devel/2019-05/msg00062.html> and
Bug#35334.
* doc/lispref/processes.texi (Filter Functions): Go back to using
plain insert in the example filter. Add note about updating window
point.
| -rw-r--r-- | doc/lispref/processes.texi | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 38ad9076a0c..a93f4db4282 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1643,7 +1643,7 @@ how to do these things: | |||
| 1643 | (save-excursion | 1643 | (save-excursion |
| 1644 | ;; @r{Insert the text, advancing the process marker.} | 1644 | ;; @r{Insert the text, advancing the process marker.} |
| 1645 | (goto-char (process-mark proc)) | 1645 | (goto-char (process-mark proc)) |
| 1646 | (insert-before-markers string) | 1646 | (insert string) |
| 1647 | (set-marker (process-mark proc) (point))) | 1647 | (set-marker (process-mark proc) (point))) |
| 1648 | (if moving (goto-char (process-mark proc))))))) | 1648 | (if moving (goto-char (process-mark proc))))))) |
| 1649 | @end group | 1649 | @end group |
| @@ -1659,7 +1659,12 @@ text arrives, you could insert a line like the following just before the | |||
| 1659 | 1659 | ||
| 1660 | To force point to the end of the new output, no matter where it was | 1660 | To force point to the end of the new output, no matter where it was |
| 1661 | previously, eliminate the variable @code{moving} from the example and | 1661 | previously, eliminate the variable @code{moving} from the example and |
| 1662 | call @code{goto-char} unconditionally. | 1662 | call @code{goto-char} unconditionally. Note that this doesn't |
| 1663 | necessarily move the window point. The default filter actually uses | ||
| 1664 | @code{insert-before-markers} which moves all markers, including the | ||
| 1665 | window point. This may move unrelated markers, so it's generally | ||
| 1666 | better to move the window point explicitly, or set its insertion type | ||
| 1667 | to @code{t} (@pxref{Window Point}). | ||
| 1663 | 1668 | ||
| 1664 | @ignore | 1669 | @ignore |
| 1665 | In earlier Emacs versions, every filter function that did regular | 1670 | In earlier Emacs versions, every filter function that did regular |