elisp - Can I limit the length of the compilation buffer in Emacs? -


is possible limit number of lines emacs compilation buffer stores? our build system can produce 10,000 lines of output on whole product builds, if no errors encountered. since compilation buffer parses ansi colors, can very, slow. have e.g. 2,000 lines of output buffered.

it appears comint-truncate-buffer works compilation buffers shell buffers:

(add-hook 'compilation-filter-hook 'comint-truncate-buffer) (setq comint-buffer-maximum-size 2000) 

i tested running compile command perl -le 'print 1..10000'. when done, first line in compilation buffer 8001.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -