GNU bug report logs - #55811
29.0.50; No flymake diagnostics for no-byte-compile files

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sun, 5 Jun 2022 20:24:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #59 received at 55811 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 João Távora <joaotavora <at> gmail.com>, 55811 <at> debbugs.gnu.org
Subject: Re: bug#55811: 29.0.50;
 No flymake diagnostics for no-byte-compile files
Date: Tue, 21 Jan 2025 07:32:31 -0500
[Message part 1 (text/plain, inline)]
Indeed. I'd forgotten that the flymake byte compiler runs in a subprocess,
rendering locals overrides in the calling process useless. That at least
addresses flymake.

Without a flag or bound variable to inform byte-compile-file to ignore
no-byte-compile, elisp-byte-compile-buffer and elisp-byte-compile-file,
which do run in process, fail silently.

Would be great to adopt the simple flymake change in master, if not also in
30 (I can hear the hoots of "it's too late for 30" already). The patch is
not really practical when using a packaged Emacs. In the meantime, I'll
disable no-byte-compile.

On Tue, Jan 21, 2025 at 6:01 AM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:

> > OK.  Try this "100% untested patch" (TM) then:
> >
> > diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
> > index 70826b4c3a..b99007c938 100644
> > --- a/lisp/progmodes/elisp-mode.el
> > +++ b/lisp/progmodes/elisp-mode.el
> > @@ -2152,7 +2152,9 @@ elisp-flymake--batch-compile-for-flymake
> >                    collected)
> >              t)))
> >      (unwind-protect
> > -        (byte-compile-file file)
> > +        (progn
> > +          (setq-local no-byte-compile nil)
> > +          (byte-compile-file file))
> >        (ignore-errors
> >          (kill-buffer byte-compile-log-buffer)))
> >      (prin1 :elisp-flymake-output-start)
>
> I didn't test it, but if this works, it looks good to me,
>
>
>         Stefan
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.