Limit run-service buffers to 400 lines

This commit is contained in:
Jeremy Dormitzer 2019-11-13 09:48:52 -05:00
parent 288f54137c
commit 0a6003dc90

View File

@ -3098,7 +3098,11 @@ Some functions to make my day job easier.
(defun run-service (name program &rest args)
(let ((bufname (format "*%s*" name)))
(apply #'make-comint-in-buffer name bufname program nil args)
(with-current-buffer bufname (toggle-truncate-lines 1))))
(with-current-buffer bufname
(set (make-local-variable 'comint-output-filter-functions)
(cons #'comint-truncate-buffer comint-output-filter-functions))
(set (make-local-variable 'comint-buffer-maximum-size) 400)
(toggle-truncate-lines 1))))
(defmacro with-venv (venv &rest body)
(declare (indent 1))