Subject: Re: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering.

From: Gerd Möllmann <[email-masked]>
Date: Wed, 21 Sep 2022 08:10:02 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Dmitrii Kuragin <[email-masked]>
>> Date: Tue, 20 Sep 2022 09:35:41 -0700
>> Cc: Gerd Möllmann <[email-masked]>, 
>> 	[email-masked]
>> 
>> But could you please elaborate a bit more on what I can do now?
>> 
>> Do we want to add a hook like `begin_frame_update` or we need to add a
>> `sync_update_begin_escape_code` or we just say, sync_update_protocol (we have 2 of those now).
>
> I think we want to add begin/end_frame_update hooks, and we want them
> to send the escape sequences that are determined by some state
> variable which tells us which of the 2 protocols to use.  We then need
> a function to allow changing that state variable, perhaps by an
> explicit user command.
>
> Bonus points for making the state variable be terminal-specific, so
> that the same Emacs session could have TTY frames on several different
> types of terminal, and use the correct protocol for each one of them.

Yes.

I'm afraid I've lost the thread a bit, but ISTR that was what we arrived
at.  Plus something had to be changed with regard to fflush at the end
of the update (it was called too early, or too late).