--- Begin Message ---
Subject: |
27.0.50; flymake-mode's lighter shows incorrect diagnostic count |
Date: |
Sat, 27 Oct 2018 14:25:22 +0200 |
User-agent: |
Zoho Mail |
After evaluating the sexp below, flymake's lighter shows [0 0]
diagnostics, despite the fact that a warning is present in the buffer.
If you uncomment the comment, flymake correctly shows that there are [1 1]
diagnostics.
(with-current-buffer (get-buffer-create "*scratch*")
(erase-buffer)
(insert "aaaaa")
(put 'my-warning 'flymake-category 'flymake-warning)
(put 'my-error 'flymake-category 'flymake-error)
(defun check-buffer (fn &rest)
(with-current-buffer "*scratch*"
(funcall
fn (list
(flymake-make-diagnostic (current-buffer) 1 2 'my-warning
"Warning.")
;; (flymake-make-diagnostic (current-buffer) 2 3 'my-error
"Error.")
))))
(setq flymake-diagnostic-functions '(check-buffer))
(flymake-mode +1)
(pop-to-buffer (current-buffer)))
The attached patch fixes this issue.
Repository revision: 3e81e9a0e7742197354515f3d3ea55fdb201eb29
0001-Fix-Flymake-s-lighter-displaying-incorrect-diagnosti.patch
Description: Binary data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#33187: 27.0.50; flymake-mode's lighter shows incorrect diagnostic count |
Date: |
Mon, 29 Oct 2018 11:52:58 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
Michał Krzywkowski <address@hidden> writes:
> After evaluating the sexp below, flymake's lighter shows [0 0]
> diagnostics, despite the fact that a warning is present in the buffer.
Hi Michal,
Thanks for reporting this. It only happens with custom error types, by
the way, which I suppose is the case with Eglot.
> The attached patch fixes this issue.
I've pushed another fix which should simplify the code rather than
complicate it. Please test it when you can.
João
--- End Message ---