Subject: bug#46388: 27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt

From: Eli Zaretskii <[email-masked]>
Date: Fri, 12 Feb 2021 22:03:40 +0200

> From: Ioannis Kappas <[email-masked]>
> Date: Fri, 12 Feb 2021 19:59:02 +0000
> Cc: Paul Eggert <[email-masked]>, [email-masked]
> 
> How do you suggest we flush the message out so that it is always
> displayed to the user irrespective of the architecture/prompt it is
> ran on? Is there perhaps an elisp function to flush messages out (e.g.
> (progn (message "...") (message-flush!) (sit-for ...))) ?
> 
> So far we said:
> 1. We don't want to a solution where the emacs -batch's stderrr is
> forced to unbuffered mode (original patch proposal)
> 2. message_to_stderr() does not directly or indirectly invoke stderr
> flush (at least in windows).

As I said, this cannot be helped, not until we teach Emacs on Windows
to use the pseudo-console.  This is how the platform behaves when we
use pipes.

Sorry, there's no way around this.