From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: HaiJun Zhang Newsgroups: gmane.emacs.devel Subject: Re: `message' not outputting the newline "atomically" Date: Mon, 24 Jun 2019 02:51:13 +0000 Message-ID: References: <83y31xr3aa.fsf@gnu.org> <26154872-1a5c-7302-0f32-b16aff8e0ae7@cs.ucla.edu> <83blytq90m.fsf@gnu.org> <95de57fb-ef8c-a65f-d3ca-4a9e7f0f38bc@cs.ucla.edu> <9f6382a8-4bb4-1018-fe18-ab01225bb4e4@cs.ucla.edu> <8df7509f-229e-3ce0-1d35-ab361467e4f9@grinta.net>, Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_HK0PR04MB25467EABB29AF1B3136E0D81B7E00HK0PR04MB2546apcp_" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="105405"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "emacs-devel@gnu.org" To: Paul Eggert , Daniele Nicolodi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 24 04:51:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfF5D-000RHv-Ac for ged-emacs-devel@m.gmane.org; Mon, 24 Jun 2019 04:51:51 +0200 Original-Received: from localhost ([::1]:47712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfF5A-0002hJ-Hv for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 22:51:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60051) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfF4h-0002hC-QM for emacs-devel@gnu.org; Sun, 23 Jun 2019 22:51:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfF4g-0001si-I0 for emacs-devel@gnu.org; Sun, 23 Jun 2019 22:51:19 -0400 Original-Received: from mail-oln040092254025.outbound.protection.outlook.com ([40.92.254.25]:62688 helo=APC01-PU1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfF4f-0001Hz-UM for emacs-devel@gnu.org; Sun, 23 Jun 2019 22:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aYlWrOq8Hc+5+nkRp2otK9XOY/ZW2tKDFLnvnn3U/kE=; b=BdjSp+aQ1C8IcB3P939DqWJn5F48WcRaYmYlkSw3dqnxUivCpqttFnCNYAyGm9LygNOqgkGZT61OToMTQt/frJR6JAsBcTK0ZIl/e+bRY2QDI+2yySS0zA9ICl7Hzi2n0OztoKMpUMGswGe4tsPIaOwIVZdugFtxpk46kscBLiBj6I7Xqin6byLoLaa2xQkQGgHOeHttTDDprcJcs3lfj0whL0lkt1fqdvqzBTN5w5tkuj7l/MVN5GMHGOtNJYJfx6B7ooiR50aX44xu44Ks8PbdiJCoK3vLuWQlEsk09AohC0hIpE6cu+4WvJuJgCZCEYKBxZMYUA4HITVQlVYd2g== Original-Received: from PU1APC01FT064.eop-APC01.prod.protection.outlook.com (10.152.252.56) by PU1APC01HT227.eop-APC01.prod.protection.outlook.com (10.152.252.239) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2008.13; Mon, 24 Jun 2019 02:51:14 +0000 Original-Received: from HK0PR04MB2546.apcprd04.prod.outlook.com (10.152.252.56) by PU1APC01FT064.mail.protection.outlook.com (10.152.253.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.13 via Frontend Transport; Mon, 24 Jun 2019 02:51:13 +0000 Original-Received: from HK0PR04MB2546.apcprd04.prod.outlook.com ([fe80::b459:6b8e:5807:5e11]) by HK0PR04MB2546.apcprd04.prod.outlook.com ([fe80::b459:6b8e:5807:5e11%7]) with mapi id 15.20.2008.014; Mon, 24 Jun 2019 02:51:13 +0000 Thread-Topic: `message' not outputting the newline "atomically" Thread-Index: AQHVJqnVzm04sv8oP02TFFT1mbp4dKajHvQrgAABMKqAAAVCt4AAeQMAgAA35KeAAFUUgIAAZ70egAAp0ACABOEwgIAAGrSAgABoh0c= In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US x-incomingtopheadermarker: OriginalChecksum:53AFE56EF51E7670B3DF4B1B0993BA10E0EC1561B5864854E962535839E12D5D; UpperCasedChecksum:F51364601470FF486A3DC0142B6774117C9E80F3A4CF8E93BA19F4B734553CF9; SizeAsReceived:7248; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [fyEe1Fe+2tfNp/8eN/2rKZQ8I28XXauM] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:PU1APC01HT227; x-ms-traffictypediagnostic: PU1APC01HT227: x-microsoft-antispam-message-info: Q13uA2VgboZsJyHnSqFKOLcWm+HHHy/ixBb+7CPS71/BBYtm9l6gZxugxbYZ9xSc6IHBPSe7PiDxzfoV1f6bqbgTk7M36sDUA8gILclt1V6E6kFsF1FqaQxkz/AmroWyiZwrCcNd2oqpYxY/z5oaZh9Q5q5lO9at9kJhUyXf5djK5B97wg2Bi2AXqJ7fvFbv X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ecaef88e-a4e9-49d1-9546-08d6f84ed24c X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 02:51:13.8036 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT227 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.254.25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238080 Archived-At: --_000_HK0PR04MB25467EABB29AF1B3136E0D81B7E00HK0PR04MB2546apcp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable What about providing a custom variable to control this? I like the line buf= fer. ________________________________ From: Emacs-devel on be= half of Paul Eggert Sent: Monday, June 24, 2019 4:34 To: Daniele Nicolodi Cc: emacs-devel@gnu.org Subject: Re: `message' not outputting the newline "atomically" Daniele Nicolodi wrote: > I thought that the issue is only with > output omitted by (message) function call. Although the original bug report was indeed about 'message', the problem ca= n occur with any output sent to stderr, and merely fiddling with 'message' wi= ll not fix the more-general problem. > It is funny how message_to_stderr() has an explicit fflush(stderr) at > the end. Yes, there is a lot of cargo-culting in the stdio part of the Emacs source = code, as nobody has taken the time to review all the unnecessary cruft that has accumulated over the years; the fflush you mentioned is just part of the problem. And although I *did* take the time to do this one little thing rig= ht, I have been asked to revert the fix because of purely-hypothetical fear of ch= ange. It is frustrating, indeed. Eli essentially ordered me to revert the change, so I just now did that. He= 's the maintainer. --_000_HK0PR04MB25467EABB29AF1B3136E0D81B7E00HK0PR04MB2546apcp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
What about providing a custom variable to control this? I like the line buf= fer.


From: Emacs-devel <emacs= -devel-bounces+netjune=3Doutlook.com@gnu.org> on behalf of Paul Egge= rt <eggert@cs.ucla.edu>
Sent: Monday, June 24, 2019 4:34
To: Daniele Nicolodi
Cc: emacs-devel@gnu.org
Subject: Re: `message' not outputting the newline "atomically&q= uot;
 
Daniele Nicolodi wrote:
> I thought that the issue is only with
> output omitted by (message) function call.

Although the original bug report was indeed about 'message', the problem ca= n
occur with any output sent to stderr, and merely fiddling with 'message' wi= ll
not fix the more-general problem.

> It is funny how message_to_stderr() has an explicit fflush(stderr) at<= br> > the end.

Yes, there is a lot of cargo-culting in the stdio part of the Emacs source = code,
as nobody has taken the time to review all the unnecessary cruft that has <= br> accumulated over the years; the fflush you mentioned is just part of the problem. And although I *did* take the time to do this one little thing rig= ht, I
have been asked to revert the fix because of purely-hypothetical fear of ch= ange.
It is frustrating, indeed.

Eli essentially ordered me to revert the change, so I just now did that. He= 's
the maintainer.

--_000_HK0PR04MB25467EABB29AF1B3136E0D81B7E00HK0PR04MB2546apcp_--