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

Previous Next

Package: emacs;

Reported by: Ioannis Kappas <ioannis.kappas <at> gmail.com>

Date: Mon, 8 Feb 2021 21:22:02 UTC

Severity: normal

Found in version 27.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ioannis Kappas <ioannis.kappas <at> gmail.com>
Cc: 46388 <at> debbugs.gnu.org
Subject: bug#46388: 27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt
Date: Tue, 09 Feb 2021 00:36:33 -0500
> From: Ioannis Kappas <ioannis.kappas <at> gmail.com>
> Date: Mon, 8 Feb 2021 21:42:09 +0000
> 
>     A solution thus to correct this behavior in emacs -batch on
>     windows-nt would be to check if it is connected to the console,
>     and when not, set stderr mode to unbuffered.

Thanks for the analysis and the patch proposal.  However, I don't
think this is a good idea.  For starters, stderr could be connected to
a file, in which case we do want it to be buffered.  More generally,
stderr could be used for something other than outputting urgent
messages, in which case making it unbuffered will make I/O less
efficient for no good reason.  And this would make Emacs on Windows
behave differently from Posix systems, which is also a downside.

I think a much better way forward in this area is to teach Emacs to
use the Pseudo Consoles introduced in recent Windows versions.  That
would allow us to support subprocess communications via PTYs on
MS-Windows, and thus will solve this and other similar issues.

Patches to support PTYs on Windows are welcome.




This bug report was last modified 4 years and 70 days ago.

Previous Next


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