On Tue, 8 Dec 2020 at 22:31, Lars Ingebrigtsen wrote: > Reuben Thomas writes: > > > If I try it now, it doesn't seem to truncate the buffer as expected: for > example > > > > emacs -Q > > M-: (add-to-list 'comint-output-filter-functions 'comint-truncate-buffer) > > M-x term > > C-c M-x set-variable comint-buffer-maximum-size 256 ; do this after M-x > term > > because before comint-buffer-maximum-size is not defined > > $ seq 1 1024 > > > > The entire output is retained, and not truncated. Truncation seems to > happen at > > 2048 lines. This does not even correspond to the original value of the > variable > > (1024). > > I'm not getting any truncation... but that variable is about comint > buffers, like in `M-x shell' and the like. Is term-mode a comint > buffer? It's not derived from comint-mode, so I'm not sure whether this > is supposed to work there? > Ah, that would seem to explain it! Indeed, `term-buffer-maximum-size` defaults to 2048. So this bug report is based on a misunderstanding, and you can close it, sorry! In investigating, I noticed that the following text in term.el appears to be out of date: ;; Brief Command Documentation: … for example: ;; M-s comint-next-matching-input Next input that matches ← This is not true! It is bound to term-next-matching-input. Is there any point retaining this documentation at the top of the file where it doesn't appear in the manual or any docstring? -- https://rrt.sc3d.org