all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: larsi@gnus.org, daniele@grinta.net, emacs-devel@gnu.org
Subject: Re: `message' not outputting the newline "atomically"
Date: Sun, 07 Jul 2019 17:51:34 +0300	[thread overview]
Message-ID: <83tvbx7v9l.fsf@gnu.org> (raw)
In-Reply-To: <73e8afc0-2151-9c8b-26c5-454fcd2f361d@cs.ucla.edu> (message from Paul Eggert on Sat, 6 Jul 2019 18:16:03 -0700)

> Cc: larsi@gnus.org, daniele@grinta.net, emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sat, 6 Jul 2019 18:16:03 -0700
> 
> What I *think* you meant is that you want code that outputs diagnostics 
> conveniently, via functions like 'fprintf' and 'message' and 'fatal' etc., to 
> output as much as possible within the constraints of (a) not significantly 
> obstructing convenience and (b) fixing the line-interleaving bugs somehow.

Yes, that's what I meant.

> > I was certain what I wrote will not be interpreted
> > in this way.
> 
> I'm afraid that you were mistaken there. Even now I'm not sure I understand 
> exactly what you meant. It is an area where it's tough to be precise.

Sorry, I'm trying.

> > using the above for diagnostic output, or for informative
> > messages output during an Emacs build, is unrelated to the original
> > problem raised by Lars.  That problem was with messages from a running
> > Emacs, outside of the build process (because the build process use
> > case can be handled by the Make's -O switch), i.e. when Emacs is run
> > as part of some script.
> 
> Sorry, I'm not following you here, as Lars's original email 
> <https://lists.gnu.org/r/emacs-devel/2019-06/msg00710.html> was about messages 
> generated by Emacs running inside the build process.
> 
> We cannot rely on 'make -O' to address the problem, as 'make -O' slows down 
> development, which is why I typically don't use 'make -O' and don't recommend it 
> for building Emacs interactively. 'make -O' can be useful for buildbots where 
> there's a batch process that waits for build completion before publishing it. 
> However, under an interactive Emacs where I want to act on the first diagnostic 
> right away (before the build finishes), 'make -O' is a net minus because it can 
> delay diagnostics significantly, and this delay costs more than it's worth.
> 
> And even if we assumed 'make -O' sufficed for builds (which it doesn't), we 
> can't assume these diagnostics are generated from a single instance of GNU Make. 
> It's reasonably common, for example, that from a terminal window I'll run the 
> shell command "emacs &", and then do other stuff in that window while Emacs 
> occasionally outputs stderr diagnostics. (Although I think this is the sort of 
> thing you're alluding to above, I'm not sure.) So we would have an interleaving 
> problem anyway even if 'make -O' worked well.

This long thread began with a message that is output during a build.
Lars didn't like such messages mixed up from several Emacsen running
in parallel, so I proposed -O.  Then Lars said that use of 'message'
is not limited to building Emacs, and we embarked on the rest of the
thread.

With the 'message' case now solved by your patch (which is fine by me,
thanks), we are now back to the messages which are only output during
the build, or are diagnostic messages about abnormal or even fatal
situations.

I don't want us to buffer diagnostics and fatal error messages.  The
other messages, such as the one which outputs the pdumper fingerprint,
could be modified to not mix with others, if you really want, but I
really question the utility of that.

As for "make -O", could it be that you were talking literally about
that, i.e. about "make -O=target"?  Because I meant "make -O=line",
which AFAIR slows down the build only slightly, and provides the
line-level separation that you want to see.  I think using that is a
good compromise.

> +#ifndef DOS_NT /* _IOLBF does not work on MS-Windows.  */

This should be WINDOWSNT, not DOS_NT.

Thanks.



  reply	other threads:[~2019-07-07 14:51 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 14:12 `message' not outputting the newline "atomically" Lars Ingebrigtsen
2019-06-19 14:28 ` Andreas Schwab
2019-06-19 15:41 ` Eli Zaretskii
2019-06-19 15:47   ` Lars Ingebrigtsen
2019-06-19 16:05     ` Andreas Schwab
2019-06-19 23:22       ` Paul Eggert
2019-06-20  2:35         ` Eli Zaretskii
2019-06-20  7:47           ` Paul Eggert
2019-06-20  9:35             ` Lars Ingebrigtsen
2019-06-20 12:52             ` Eli Zaretskii
2019-06-20 12:55               ` Lars Ingebrigtsen
2019-06-20 13:13                 ` Eli Zaretskii
2019-06-20 14:05                 ` Andreas Schwab
2019-06-20 16:26               ` Paul Eggert
2019-06-20 16:45                 ` Eli Zaretskii
2019-06-20 17:41                   ` Paul Eggert
2019-06-20 18:06                     ` Eli Zaretskii
2019-06-20 19:33                       ` Paul Eggert
2019-06-21  5:46                         ` Eli Zaretskii
2019-06-21  6:06                           ` Eli Zaretskii
2019-06-22  0:20                           ` Paul Eggert
2019-06-22  7:32                             ` Eli Zaretskii
2019-06-22 19:14                               ` Paul Eggert
2019-06-23  2:25                                 ` Eli Zaretskii
2019-06-23  8:34                                   ` Paul Eggert
2019-06-23 11:37                                     ` Lars Ingebrigtsen
2019-06-23 14:47                                     ` Eli Zaretskii
2019-06-23 17:32                                       ` Paul Eggert
2019-06-23 18:28                                         ` Eli Zaretskii
2019-06-23 12:53                                   ` Stefan Monnier
2019-06-23 14:51                                     ` Eli Zaretskii
2019-06-24  4:09                                       ` Stefan Monnier
2019-06-22  8:26                             ` Andreas Schwab
2019-06-22 18:53                               ` Paul Eggert
2019-06-22 19:00                                 ` Eli Zaretskii
2019-06-22 19:15                                   ` Paul Eggert
2019-06-22 19:48                                 ` Andreas Schwab
2019-06-20 13:32             ` Stefan Monnier
2019-06-20 16:28               ` Paul Eggert
2019-06-23 18:59                 ` Daniele Nicolodi
2019-06-23 20:34                   ` Paul Eggert
2019-06-23 20:42                     ` Lars Ingebrigtsen
2019-06-23 21:00                       ` Paul Eggert
2019-06-23 22:18                         ` Lars Ingebrigtsen
2019-06-23 20:48                     ` Daniele Nicolodi
2019-06-24  2:32                     ` Eli Zaretskii
2019-06-24  2:51                     ` HaiJun Zhang
2019-06-24 19:48 ` Lars Ingebrigtsen
2019-06-24 20:03   ` Daniele Nicolodi
2019-06-24 20:17     ` Lars Ingebrigtsen
2019-06-24 21:11       ` Paul Eggert
2019-06-24 21:33         ` Lars Ingebrigtsen
2019-06-24 22:03           ` Paul Eggert
2019-06-24 22:06             ` Paul Eggert
2019-06-24 22:28             ` Lars Ingebrigtsen
2019-06-24 22:47               ` Lars Ingebrigtsen
2019-06-25 16:03                 ` Eli Zaretskii
2019-06-26  9:15                   ` Lars Ingebrigtsen
2019-06-26 15:22                     ` Eli Zaretskii
2019-06-27 10:52                       ` Lars Ingebrigtsen
2019-06-26 18:27                   ` Paul Eggert
2019-06-26 18:41                     ` Eli Zaretskii
2019-06-26 18:58                       ` Paul Eggert
2019-06-26 19:11                         ` Eli Zaretskii
2019-06-26 19:36                           ` Daniele Nicolodi
2019-06-27  2:34                             ` Eli Zaretskii
2019-06-27  5:43                               ` Paul Eggert
2019-06-30 20:11                               ` Daniele Nicolodi
2019-07-01  7:41                               ` Daniele Nicolodi
2019-07-01 14:39                                 ` Eli Zaretskii
2019-07-01 17:01                                   ` Daniele Nicolodi
2019-07-02  2:28                                     ` Eli Zaretskii
2019-07-02  7:58                                       ` Daniele Nicolodi
2019-07-02 14:47                                         ` Eli Zaretskii
2019-07-02 20:56                                           ` Daniele Nicolodi
2019-07-03  5:23                                             ` Eli Zaretskii
2019-07-01 17:03                                   ` Daniele Nicolodi
2019-07-02  2:26                                     ` Eli Zaretskii
2019-06-26 19:38                           ` Paul Eggert
2019-06-25 16:06             ` Eli Zaretskii
2019-06-26  9:21               ` Lars Ingebrigtsen
2019-06-26 15:23                 ` Eli Zaretskii
2019-06-27 11:03                   ` Lars Ingebrigtsen
2019-06-27 13:31                     ` Eli Zaretskii
2019-06-28  8:30                       ` Lars Ingebrigtsen
2019-07-03  7:31                       ` Paul Eggert
2019-07-03  7:41                         ` Eli Zaretskii
2019-07-03  7:47                           ` Eli Zaretskii
2019-07-03  7:57                             ` Eli Zaretskii
2019-07-03  8:45                               ` Paul Eggert
2019-07-03  9:30                                 ` Eli Zaretskii
2019-07-03 23:08                                   ` Paul Eggert
2019-07-04 13:24                                     ` Eli Zaretskii
2019-07-07  1:16                                       ` Paul Eggert
2019-07-07 14:51                                         ` Eli Zaretskii [this message]
2019-07-08 22:35                                           ` Richard Copley
2019-07-09  2:33                                             ` Eli Zaretskii
2019-07-09 13:45                                               ` Richard Copley
2019-07-09 15:16                                                 ` Eli Zaretskii
2019-07-09  2:47                                           ` Paul Eggert
2019-07-09 16:39                                             ` Eli Zaretskii
2019-07-09 18:12                                               ` Paul Eggert
2019-07-09 18:32                                                 ` Eli Zaretskii
2019-07-09 18:44                                                   ` Lars Ingebrigtsen
2019-07-09 19:17                                                     ` Eli Zaretskii
2019-07-14  0:42                                                   ` Paul Eggert
2019-07-14  6:01                                                     ` Eli Zaretskii
2019-06-25 16:08         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tvbx7v9l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=daniele@grinta.net \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.