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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 08 Sep 2022 11:20:32 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 08 Sep 2022 08:43:46 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > So you are saying at this point only my last alternative, i.e. a
> > variable exposed to Lisp, is a reasonable way ahead?  Until, that is,
> > those emulators get their act together and agree on some standard way
> > of detecting the need for synchronized updates?
> 
> Yes, I think an option is currently all we can do.  And somehow define
> what to send to the terminal, P1 or P2.

What is P1 and what is P2?

> I installed iTerm2 just now, which implements P2 at least.  iTerm2 has a
> preference options to switch GPU acceleration on/off.  iTerm2 uses
> TERM=xterm256-color, independent of the GPU setting.  So matching TERM
> wouldn't work with iTerm2.  The query control sequence of P2 seems to
> return if GPU accel is on or off on iTerm2.

What is the "query control sequence"?

> >> I know Sync as an xterm extension, although I don't remember what it is
> >> for.  It's a non-standard terminfo capability which is only shown with
> >> infocmp -x.
> >> 
> >> Neither P1 nor P2 mention Sync in any way.
> >
> > Does terminfo return the Sync capability on those terminals, as it
> > returns the standard ones?  That is, can we test for it inside
> > init_tty?
> 
> I think so.
> 
> BTW, iTerm2 doesn't seem to define Sync.  Kitty does. It's a mess.

We could at least detect that when terminfo returns non-nil for Sync.

Do you happen to know where is the definitive documentation of Sync?