I launch a shell in my session with M-x shell
and then I launch a python script that produces a lot of output to stdout---so many lines of output that my emacs session beomes quite slow.
Is there a command I can run to ask my buffer to be fixed length and automatically delete lines older than N? I have tried looking this up, but don't even know what terms to use in my query beyond "automatically delete," "circular buffer" and "fixed length" which were not helpful.
M-x comint-truncate-buffer
. Ref: https://stackoverflow.com/questions/25862743/emacs-can-i-limit-a-number-of-lines-in-a-buffer – Mittenchops Jul 20 '20 at 05:46