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

From: Ihor Radchenko <[email-masked]>
Date: Thu, 13 Jul 2023 17:19:29 +0000

Eli Zaretskii <[email-masked]> writes:

>> If my understanding is correct,
>> current_buffer->prevent_redisplay_optimizations_p = true does not belong
>> to `force-mode-line-update', but rather to `restore-buffer-modified-p'.
>
> The purpose of force-mode-line-update is to do what its name says,
> regardless of whether the buffer was modified or not, and how it was
> modified.  The idea is that Lisp programs which change something that
> they know must affect the mode line call this function to make sure
> the mode line is redrawn with up-to-date information.

I do not claim that I fully understand, but what is confusing is that a
number of other places in code simply use bset_update_mode_line without
disabling optimizations. In particular:

1. kill-all-local-variables
2. rename-buffer

Also, `force-window-update' disable optimizations for a given window,
but not when all windows should be updated - in contrast with the code
in OP.

So, `force-window-update' and `force-mode-line-update' are at least
inconsistent.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>