Auto-truncate compilation buffers

To prevent memory issues in long lived processes.

Allows #4261 to be merged
Addresses (and mentioned in) asok/projectile-rails#148
This commit is contained in:
Henrik Lissner 2021-02-26 21:20:39 -05:00
parent bbdea54b77
commit 9ef11d0e31

View File

@ -361,7 +361,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(after! comint
(setq comint-prompt-read-only t))
(setq comint-prompt-read-only t
comint-buffer-maximum-size 2048)) ; double the default
(after! compile
@ -369,7 +370,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
compilation-ask-about-save nil ; save all buffers on `compile'
compilation-scroll-output 'first-error)
;; Handle ansi codes in compilation buffer
(add-hook 'compilation-filter-hook #'doom-apply-ansi-color-to-compilation-buffer-h))
(add-hook 'compilation-filter-hook #'doom-apply-ansi-color-to-compilation-buffer-h)
;; Automatically truncate compilation buffers so they don't accumulate too
;; much data and bog down the rest of Emacs.
(autoload 'comint-truncate-buffer "comint" nil t)
(add-hook 'compilation-filter-hook #'comint-truncate-buffer))
(after! ediff