From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 55811@debbugs.gnu.org
Subject: bug#55811: 29.0.50; No flymake diagnostics for no-byte-compile files
Date: Tue, 07 Jun 2022 13:02:41 +0100 [thread overview]
Message-ID: <87bkv465r2.fsf@gmail.com> (raw)
In-Reply-To: <jwv35ggn1gx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 07 Jun 2022 07:47:24 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Of course you know this -- but just to clarify -- the byte-compilation
>> backend works by launching a Emacs -Q which is asked to byte-compile
>> only a file containing the current buffer's contents. During that
>> byte-compilation nothing more is loaded apart from what is preloaded or
>> explicitly loaded by the file at compile-time (via require or
>> eval-when/and-compile stuff).
>
> This bug-report is about the fact that there is no benefit to
> obeying `no-byte-compile` in flymake. Not about improving the way the
> sub-process reproduces a "good" initial state to compile the file
> (e.g. set up of `load-path` and whatnot).
Sure, I understood. I was just commenting on the fact that the quality
of Flymake diagnostics might not be so good/helpful since those
diagnostics are likely affected by the same root causes that prevent
normal byte compilation anyway.
( Also, on the tangent note about load-path and Flymake, I completely
forgot that I added elisp-flymake-byte-compile-load-path some 4 years
ago.)
>> Anyway, maybe you could give small example of such a file containing
>> such a cookie where you think Flymake's "I refuse to lint this" behavior
>> could be improved.
>
> A good example are all the files in the
> [EEV](http://elpa.gnu.org/packages/eev.html) package.
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)
prev parent reply other threads:[~2022-06-07 12:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 20:22 bug#55811: 29.0.50; No flymake diagnostics for no-byte-compile files Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-05 20:33 ` Lars Ingebrigtsen
2022-06-05 23:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-06 12:40 ` Lars Ingebrigtsen
2022-06-07 6:41 ` João Távora
2022-06-07 11:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 11:54 ` Lars Ingebrigtsen
2022-06-07 12:13 ` João Távora
2022-06-07 13:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 12:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 12:42 ` Lars Ingebrigtsen
2022-06-07 13:49 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 12:02 ` João Távora [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkv465r2.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=55811@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.