[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `message' not outputting the newline "atomically"

From: Paul Eggert
Subject: Re: `message' not outputting the newline "atomically"
Date: Fri, 21 Jun 2019 17:20:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/20/19 10:46 PM, Eli Zaretskii wrote:
Every important Emacs stderr message ends in newline
So now we will have to enforce this all over the place

It's already enforced, in the sense that (a) it's standard practice anyway, (b) a stderr diagnostic without a trailing newline is a bug since it'll mess up formatting for the next stderr diagnostic, and (c) POSIX allows platforms to line-buffer stderr by default and Emacs has been working on such platforms for ages anyway.

If it helps, I can audit all uses of stderr in the Emacs source to see if any newlines are being omitted. Any such omissions are buggy anyway for reasons (a), (b), and (c), and this is true regardless of whether Emacs explicitly enables line-buffering for stderr. I would not be surprised to find one or two bugs in the hundreds of diagnostics that Emacs generates, but now is as good a time as any to fix any bugs that I find.

people don't expect stderr to be buffered
Actually I expected stderr to be line-buffered, a behavior that POSIX allows and that I vaguely recall when running GNU code (sorry, don't remember what platforms). Evidently things are different in the milieu of MS-Windows as it does not support line-buffering; still, Emacs and other GNU programs have worked with line-buffered stderr for ages.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]