From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitrii Kuragin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering. Date: Fri, 9 Sep 2022 08:48:57 -0700 Message-ID: References: <83mtbks7mo.fsf@gnu.org> <837d2mqm98.fsf@gnu.org> <8335daqlsa.fsf@gnu.org> <83k06komhi.fsf@gnu.org> <83pmgcmmf1.fsf@gnu.org> <83leqvgib2.fsf@gnu.org> <83r10mfkn1.fsf@gnu.org> <83illyffan.fsf@gnu.org> <83a67afcq0.fsf@gnu.org> Reply-To: Dmitrii Kuragin Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008ccca005e8407cf4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25249"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 57434@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 09 17:50:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWgGk-0006LI-6y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 17:50:14 +0200 Original-Received: from localhost ([::1]:41136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWgGj-0002r1-A9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 11:50:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWgGY-0002ql-Rl for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 11:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWgGY-00007t-I6 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 11:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWgGY-0006Pt-91 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 11:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitrii Kuragin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2022 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57434 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57434-submit@debbugs.gnu.org id=B57434.166273856124600 (code B ref 57434); Fri, 09 Sep 2022 15:50:02 +0000 Original-Received: (at 57434) by debbugs.gnu.org; 9 Sep 2022 15:49:21 +0000 Original-Received: from localhost ([127.0.0.1]:35084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWgFs-0006Oh-Ba for submit@debbugs.gnu.org; Fri, 09 Sep 2022 11:49:20 -0400 Original-Received: from mail-yw1-f169.google.com ([209.85.128.169]:37793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWgFm-0006OQ-Fr for 57434@debbugs.gnu.org; Fri, 09 Sep 2022 11:49:19 -0400 Original-Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-3454b0b1b6dso23846117b3.4 for <57434@debbugs.gnu.org>; Fri, 09 Sep 2022 08:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=lq8EtapzR/wbwfC/xXdUO4g13z79gSLosHg3eNVft9k=; b=K+SXlwEUQL42+1XledERFccEk6PrZI597Jqtqs0dka4R/DlrkoKMDZPibYFJVOcMbd 1P0q94PpfTOBlD0sqgh8zPOY9I1R7DArftXnfaukyQ3WlAglLmfa/6RDichA+FTuFSp4 fLSzAaNEkuTRBeiSJbN4Wor6Fhvjw6Uye/5D5xgFOdYt52U2CynuOVxXoLbZFrXBCp/k DOddhpbyTV9mmHgLxMUxJTt310pmYrNiH+rzT30Cdn3tmC8XMBes+gVzi9DZ43qS+cK+ j3BRcmJXgFunrGcXZ82lYq52o/uUV1/LZYGJxboA2R32u2qGKqF56ns97Edtu0q36YMY HfHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=lq8EtapzR/wbwfC/xXdUO4g13z79gSLosHg3eNVft9k=; b=Jya+c0GRGsl2o2uisRsPxGsj8iPjkIimq5YDrYTpH7FP4l/xHJuH5nr2rXTzKXswAS IYBlyUoL9f6Nm4DojHXNU25N6daZf5wNjwaxej4x8tZMLA0/Cf6zRkFWledzRc0cdcmg mrJaIsZ+4qKiANdcLz3qfgie6/ZExXWsRAVwOh88XKYHNrTtPqMWphzppziwqi5ihwiF 5K/mLeGlssKbZ6BUpaRhbaNhLxZYYK+r7U7sEoVVygay70egqvHeabfSWQL5U7vaWEhO XI/rURkNGUGQ3WFHWmZtjvAS+EBiyNEExQZS4zj7l/FGz+yUIUdxOqwRZl3g1sDEgX4f nxFw== X-Gm-Message-State: ACgBeo2jGtW8Vn6kU29FZpAuRiHzEZonURo0U8SUomJd6x4S0OBASLIq G2+B5A08bugetfnNUCOv5Mc+p96Yfw5xtL3T8TT9bQ== X-Google-Smtp-Source: AA6agR6+dUg3UWpEYjiz5Y60KGpN2NJU3btXONtKT5jb8igtm3p4W8t1JtlzAHZRAwEXU3lnrZTU/aJRGni7AXwVwq4= X-Received: by 2002:a81:49cf:0:b0:348:5dd8:d85c with SMTP id w198-20020a8149cf000000b003485dd8d85cmr11241324ywa.467.1662738548676; Fri, 09 Sep 2022 08:49:08 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241995 Archived-At: --0000000000008ccca005e8407cf4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If everyone is OK with adding a new frame-local elisp flag, then I can prepare a patch. On Thu, Sep 8, 2022 at 8:59 AM Dmitrii Kuragin wrote: > I agree with Gerd on the discoveries. > > Here's some code how tmux works with that [1], we can probably avoid it b= y > providing a frame-local flag which enables the functionality, so that > multiple emacs clients might be connected from potentially different > terminals. > > We can improve the default value of the flag based on terminal > capabilities later once we have confidence in the way it works and probab= ly > extend it to support different specifications of syncing. > > [1]: > https://github.com/tmux/tmux/blob/9c34aad21c0837123a51a5a4233a016805d3e52= 6/tty-features.c#L474 > > On Thu, Sep 8, 2022 at 2:35 AM Gerd M=C3=B6llmann > wrote: > >> Eli Zaretskii writes: >> >> > I guess by P1 you mean these two sequences: >> > >> > BSU: ESC P =3D 1 s ESC \ >> > ESU: ESC P =3D 2 s ESC \ >> > >> > whereas by P2 you mean these: >> > >> > DECRQM: ESC [ ? 2026 $ p >> > DECRPM: ESC [ ? 2026 ; n $ y (with n =3D 0..4, and 0 or 4 means "no >> support") >> > BSU: ESC [ ? 2026 h >> > ESU: ESC [ ? 2026 l >> >> Yes, that looks like them. >> >> > >> >> > Do you happen to know where is the definitive documentation of Sync= ? >> >> >> >> Sorry, I don't know a definitive documentation. >> > >> > And any documentation at all? >> >> Not even that. I tried to find something today, but nothing useful >> turned up. >> >> > >> > Anyway, given the problems usually related to querying terminals about >> > potentially unsupported features, and the general mess in this field, >> > I think our best bet is to have a function that could switch the >> > frame-update hooks between these 3 states: >> > >> > . unused >> > . used with P1 BSU/ESU sequences >> > . used with P2 BSU/ESU sequences >> > >> > WDYT? >> >> Yes, something like that, I guess. >> > > > -- > *If you get an email from me outside of the 9-5 it is *not* because I'm > always on or expect an immediate response from you; it is because of work > flexibility > > . Evening and weekend emails are a sign I allocated some regular working > hours for other things (such as family, gym, friends,...). And I encoura= ge > you to feel free to do the same. > > --=20 *If you get an email from me outside of the 9-5 it is *not* because I'm always on or expect an immediate response from you; it is because of work flexibility . Evening and weekend emails are a sign I allocated some regular working hours for other things (such as family, gym, friends,...). And I encourage you to feel free to do the same. --0000000000008ccca005e8407cf4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If everyone is OK with adding a new frame-local elisp f= lag, then I can prepare a patch.

=
On Thu, Sep 8, 2022 at 8:59 AM Dmitri= i Kuragin <kuragin@google.com&= gt; wrote:
I agree with Gerd on the discoveries.

H= ere's some code how tmux works with that [1], we can probably avoid it = by providing a frame-local flag which enables the functionality, so that mu= ltiple emacs clients might be connected from potentially different terminal= s.

We can improve the default value of the flag based = on terminal capabilities later once we have confidence in the way it works = and probably extend it to support different specifications of syncing.


On Thu, Sep 8, 2022 at 2:35 AM Gerd M=C3=B6l= lmann <ger= d.moellmann@gmail.com> wrote:
Eli Zaretskii <eliz@gnu.org> writes:

> I guess by P1 you mean these two sequences:
>
>=C2=A0 =C2=A0BSU: ESC P =3D 1 s ESC \
>=C2=A0 =C2=A0ESU: ESC P =3D 2 s ESC \
>
> whereas by P2 you mean these:
>
>=C2=A0 =C2=A0DECRQM: ESC [ ? 2026 $ p
>=C2=A0 =C2=A0DECRPM: ESC [ ? 2026 ; n $ y=C2=A0 (with n =3D 0..4, and 0= or 4 means "no support")
>=C2=A0 =C2=A0BSU:=C2=A0 =C2=A0 ESC [ ? 2026 h
>=C2=A0 =C2=A0ESU:=C2=A0 =C2=A0 ESC [ ? 2026 l

Yes, that looks like them.

>
>> > Do you happen to know where is the definitive documentation o= f Sync?
>>
>> Sorry, I don't know a definitive documentation.
>
> And any documentation at all?

Not even that.=C2=A0 I tried to find something today, but nothing useful turned up.

>
> Anyway, given the problems usually related to querying terminals about=
> potentially unsupported features, and the general mess in this field,<= br> > I think our best bet is to have a function that could switch the
> frame-update hooks between these 3 states:
>
>=C2=A0 =C2=A0. unused
>=C2=A0 =C2=A0. used with P1 BSU/ESU sequences
>=C2=A0 =C2=A0. used with P2 BSU/ESU sequences
>
> WDYT?

Yes, something like that, I guess.


--
*If yo= u get an email from me outside of the 9-5 it is=C2=A0not=C2=A0becaus= e I'm always on or expect an immediate response from you; it is because= of=C2=A0work flexibility.=C2= =A0=C2=A0Evening and weekend emails= are a sign I allocated some regular working hours for other things (such a= s family, gym, friends,...).=C2=A0 And I encourage you to feel free to do t= he same.



--
*If you get an email from me outside of the 9-5 it is=C2= =A0not=C2=A0because I'm always on or expect an immediate respons= e from you; it is because of=C2=A0<= a href=3D"http://www.inc.com/john-boitnott/how-flexible-hours-can-create-a-= better-work-life-balance.html" style=3D"color:rgb(17,85,204)" target=3D"_bl= ank">work flexibility.=C2=A0=C2=A0= Evening and weekend emails are a sign I allocated some regular working hour= s for other things (such as family, gym, friends,...).=C2=A0 And I encourag= e you to feel free to do the same.

--0000000000008ccca005e8407cf4--