Subject: Re: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update)

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Jul 2023 18:22:01 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sat, 15 Jul 2023 10:49:37 -0400
> 
> > performance problem.  Because otherwise making changes in code that we
> > don't sufficiently understand can only cause bugs,
> 
> It can introduce bugs, but in my experience when dealing with code
> I don't understand, it's by breaking the code that you learn how it
> works, so saying "can only cause bugs" doesn't make sense.

It makes a lot of sense to me.  So let's agree to disagree here.  To
reiterate my firm opinion: either someone steps forward to work on
this seriously and systematically, or we should leave this code alone,
for better and for worse.

> The change can bring more clarity to the code, which is beneficial
> in the long term, and if it introduces bugs then presumably some
> users will see them, report them, and that will bring us better
> understanding of the code.

If someone wants to lead such a project for the next 10 years or so,
maybe.  But what happens in reality is that the breaking changes are
made, and then the "guilty parties" disappear into thin air, or lose
interest.  And we are left with a broken redisplay and an unfinished
project.

> That's eactly what happened when I introduced the 3 `redisplay` bits
> above: it did introduce a few bugs, but overall it made the code
> more clear.

No, that's not "exactly" what happened.  Some of the bugs popped up
much later, among other things.  I agree that the added comments made
the situation better, but you know as well as I do that some of the
aspects of those variables are still somewhat mysterious: specifically
the meaning of windows_or_buffers_changed and update_mode_lines for
disabling optimizations and shortcuts.  Which is exactly the focus of
the current discussion.

> > and guess who gets to work on fixing them.
> 
> AFAIK, for the bugs introduced by those `redisplay` bit: I did, as
> it should.

Not all of them.