Subject: Re: bug#58509: 29.0.50; Synchronous nativecomp

From: Eli Zaretskii <[email-masked]>
Date: Fri, 14 Oct 2022 16:05:27 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 14 Oct 2022 14:59:32 +0200
> 
> >   emacs --batch --batch-native-compile lisp/gnus/gnus*.el --eval '(gnus)
> > 
> > which is what I had in mind?
> 
> You're suggesting that users should compute with files a command will
> load, then compile those, and then start the command?

What else is possible in --batch?

> That doesn't sound like a good interface, and fortunately that's not
> how Emacs works interactively.

Interactively, async compilation is triggered by actually _loading_
stuff.  You cannot have Emacs load everything that is need for some
function call, unless you let the code of that function actually run,
because only running it will reveal all that's needed to be loaded.
Think about autoloads, eval-after-load, etc.  How can Emacs know what
files to compile ahead of running the code you are asking it to run?
Or what am I missing?