Subject: Re: bug#51437: 29.0.50; The annotated example of a complete working Flymake backend does not work with narrowed buffers

From: Rudolf Adamkovič <[email-masked]>
Date: Sat, 30 Oct 2021 23:15:14 +0200

João Távora <[email-masked]> writes:

> I can't test right now, but maybe Rudolf can. If it works then
> I'd say commit it.

The patch fixes the errors, but it also causes troubles. Say I use Flymake to check on my English grammar, and say I have 10 errors in my text. I narrow down to a part with 5 errors, fix them, write some new text, and after a while, I widen the buffer. I look through my final text, see that Flymake reports 0 errors, and submit my work to someone. Well, I submitted 5 errors, because Flymake did not re-check when I widened the buffer. Further, Flymake might report incorrect data on narrow. In the example above, it would have said 10 errors after narrowing and then 5 for the same narrowed content on the next re-check. Thus, we should either always check the entire content of the buffer, or we should recheck on narrow and widen, potentially wasting bandwidth for online checks and the like.

Rudy

-- 
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.'" -- Lewis Carroll, Through the Looking Glass

Rudolf Adamkovič <[email-masked]>
Studenohorská 25
84103 Bratislava
Slovakia

[he/him]