Subject: bug#55811: 29.0.50; No flymake diagnostics for no-byte-compile files

From: João Távora <[email-masked]>
Date: Tue, 07 Jun 2022 13:13:42 +0100

Lars Ingebrigtsen <[email-masked]> writes:

> Stefan Monnier <[email-masked]> writes:
>
>> This bug-report is about the fact that there is no benefit to
>> obeying `no-byte-compile` in flymake.
>
> Well, there are some.  If you open, say, lisp/net/tramp-loaddefs.el,
> you'll get a whole bunch of compilation errors, and you don't want to
> see those, I think?

They could be useful I guess.  There are two cases to distinguish here
(which is what I failed to clarify before).  Perhaps Stefan is thinking
of the second.

1. The file has this form:

      (require 'foo)
       
      (fooey-macro (some-shady-stuff-the-byte-comp-could-look-into))

      (some-more-shady-stuff)

      ;; Local Variables:
      ;; no-byte-compile: t
      ;; End:

   and the reason for adding the no-byte-compile cookie is that foo.el
   can't be found at compile-time.  Then I think there is little reason
   to activate Flymake there.  That's because Flymake will halt at the
   (require 'foo) and not look into the rest of the file.

2. The file is identical but doesn't have the (require 'foo), then, I
   think Flymake will underline the first form, but carry on looking
   into other stuff.  This is possibly helpful, according to one's
   own tolerance of signal-to-noise ratio.

If some files in case 2 are still unbearably noisy for some, then I
think there are existing ways to force Flymake off using buffer-local
variables.
   
João