From 0b3d6feeccda813828841c337a1524007d27cd82 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 7 Jul 2021 14:09:15 -0400 Subject: [PATCH] Fix compile filters --- misc/latex-compile-filters.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/latex-compile-filters.el b/misc/latex-compile-filters.el index d6ed247..40ce559 100644 --- a/misc/latex-compile-filters.el +++ b/misc/latex-compile-filters.el @@ -45,7 +45,7 @@ (defun ff/compilation-LaTeX-filter () (interactive) (save-excursion - (goto-char (point-min)) + (goto-char compilation-filter-start) (setq buffer-read-only nil) (while (re-search-forward "^LaTeX Warning: " nil t) (while (not (re-search-forward "\\.$" (line-end-position) t)) @@ -53,15 +53,15 @@ (delete-char 1) (beginning-of-line))) - ;; Cleanup avail lists so that the error parser does not get confused - (goto-char (point-min)) - (if (search-forward " avail lists: " nil t) - (delete-char -2)) - (setq buffer-read-only t))) + (setq buffer-read-only t))) + (add-hook 'compilation-filter-hook 'ff/compilation-LaTeX-filter) + + (require 'compile) + (add-to-list 'compilation-error-regexp-alist 'latex-warning) (add-to-list 'compilation-error-regexp-alist-alist '(latex-warning