Subject: Re: bug#36803: 27.0.50; Update mode-line of every window when compilation ends

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Jul 2019 16:12:59 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sat, 27 Jul 2019 08:46:35 -0400
> 
> >> Hmm... AFAIK the "process status" normally only indicates the status of
> >> the process running in the buffer to which this mode line belongs.
> >> Which is why I made the change to only bset_update_mode_line rather than
> >> set the global update_mode_lines.
> >
> > This is true only if the process status is modified via
> > mode-line-process, which is a buffer-local variable.  If a Lisp
> > program modifies the mode line directly, the result will be global.
> > That's what compile.el does via compilation-in-progress, but the most
> > basic operation is simply to add %s to mode-line-format (or to
> > header-line-format or even to frame-title-format).
> 
> That's not a problem: %s only shows the status *of the process in the
> current buffer*: the status of a process in buffer A is never
> reflected in the %s part of the mode-line of other buffers, which is why
> the sentinel code only causes a mode-line update for the process's buffer.

If there's no way for a Lisp program to inject a global process-status
element into the mode line, then I guess your patch is TRT, indeed.
Thanks.