From c746548d42b556993a496ed9fcce1cbf3cf4039a Mon Sep 17 00:00:00 2001 From: lecopivo Date: Wed, 19 Jun 2024 16:18:45 -0400 Subject: [PATCH] add elisp functions that clean up compilation output --- .dir-locals.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.dir-locals.el b/.dir-locals.el index aa60e2e1..eaa17ffd 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -4,3 +4,20 @@ ((lean4-mode . ((fill-column . 100) (show-trailing-whitespace . t) (eval . (add-hook 'before-save-hook 'delete-trailing-whitespace nil t))))) + + + +;; hide warning/note/info from compilation output +;; ((nil . ((eval . (progn +;; (require 'compile) +;; (defun my-hide-compilation-warnings () +;; "Hide lines in compilation buffer that start with 'warning:', 'note:', or 'info:'." +;; (save-excursion +;; (goto-char (point-min)) +;; (while (re-search-forward "^\\(warning\\|note\\|info\\):.*\n" nil t) +;; (replace-match "")))) +;; (defun my-add-compilation-hook () +;; "Add compilation filter hook if buffer is visiting a file." +;; (when buffer-file-name +;; (add-hook 'compilation-filter-hook 'my-hide-compilation-warnings))) +;; (add-hook 'find-file-hook 'my-add-compilation-hook))))))