I've written the following function to go from an error line to the next one:
(defconst mylog-mode-error-regexp "\\(\\[ERROR\\]\\|rule did fail\\)" "Regexp to recognize errors in my log file.") (defun mylog-mode-next-error () "Go to next error." (interactive) (let ((case-fold-search nil)) (search-forward-regexp mylog-mode-error-regexp) (narrow-to-region 1 (line-end-position)) (setq current-count (mylog-mode-count-errors)) (widen) (message "Error %d/%d" current-count (mylog-mode-count-errors))))
I'd like to skip some lines, the ones matching:
[ERROR][2018-05-29 07:39:25,149][Authenticated] - [Page [/login.html] is not allowed]
… as those errors aren't real errors -- which I have to debug.
How could I do that?