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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 16 Jul 2023 11:56:22 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked],
>  [email-masked]
> Date: Sun, 16 Jul 2023 08:40:38 +0000
> 
> martin rudalics <[email-masked]> writes:
> 
> > Here 'set-window-configuration' should be able to tell redisplay that it
> > should redisplay the window but it should be able to tell that iff the
> > fringe really changed which is fairly easy to find out.  Once it found
> > out, which kind of flag would it set?
> 
> May someone list all the possible displayed elements Emacs considers?

What do you mean by "display element" here?  The Emacs display engine
already has a term "display element", but I think it means something
very different: character glyphs, images, compositions, etc.  See the
function get_next_display_element in xdisp.c.

So we had better agreed on clear terminology here to avoid terrible
confusion.

> I think that it might be a good new API to have a single function that
> marks things for redisplay. That function will accept arguments
> indicating what exactly may need to be redisplayed: CURRENT_TEXT_LINE,
> FRINGE, LINE_NUMBERS, CURRENT_BUFFER_TEXT, CURRENT_BUFFER_MODELINES,
> ALL_MODELINES, CURRENT_FRAME, etc.

The first step is to identify the changes in which the display engine
is interested, and design the flag(s) to communicate this information
to it.  The actual API, whether a single function or a set of macros
or something else, comes later, and is not a complicated decision to
make.

Please note that whether current text line needs to be redisplayed, or
if line numbers need to be redisplayed, or if mode line needs to be
redisplayed, is in many cases a decision that only the display engine
can make.  So you seem to be thinking in terms that are not entirely
correct.