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: Sat, 27 Aug 2022 08:46:44 -0700 Message-ID: References: Reply-To: Dmitrii Kuragin Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ad917d05e73af065" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 Sat Aug 27 17:48:13 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 1oRy2e-0008xN-VS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 17:48:13 +0200 Original-Received: from localhost ([::1]:55278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRy2d-0007Q6-P9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 11:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRy2V-0007N2-JJ for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 11:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRy2V-00088A-A2 for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 11:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRy2V-0003Ur-5m for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 11:48:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitrii Kuragin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Aug 2022 15:48:03 +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.166161522513211 (code B ref 57434); Sat, 27 Aug 2022 15:48:03 +0000 Original-Received: (at 57434) by debbugs.gnu.org; 27 Aug 2022 15:47:05 +0000 Original-Received: from localhost ([127.0.0.1]:56842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRy1Y-0003R1-Ff for submit@debbugs.gnu.org; Sat, 27 Aug 2022 11:47:04 -0400 Original-Received: from mail-oi1-f181.google.com ([209.85.167.181]:40915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRy1V-0003QU-EA for 57434@debbugs.gnu.org; Sat, 27 Aug 2022 11:47:03 -0400 Original-Received: by mail-oi1-f181.google.com with SMTP id n124so5587525oih.7 for <57434@debbugs.gnu.org>; Sat, 27 Aug 2022 08:47:01 -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; bh=uidHsuVviU3zzPIz6cbWhnG2hPiB8ZMk1mEpD9PT09s=; b=F/0JmI4sEWKEsY32Lq3vidlJQiJwAT+82THLRLMW0DWLl463TdLn20OqLieo444Ceh 3Dt8Ea1RVBtphKLC0ERDV2ji5YdwzoA9UCJpX3ZBYGDnTzIjYkUKe0JoaZXXISgU7Ecj inW9LQUunm+Bo1Gxviocne3iMPkBExf2KS6n273gOMWcNplzfRqNwnR+iZqXCmnIp6mN NjPHxv0pLTVp25PFds0eB2jv7LPlZLy2HvbweOviJFSEDVUh4fN50il0teH3B4k2P6lj YJJ+KBPHu2yee34pD7Jz00UIpObcYt4B+/VUnmtyCX0TGQuZ0A+0pgicioE2zcmcHYFO GX8w== 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; bh=uidHsuVviU3zzPIz6cbWhnG2hPiB8ZMk1mEpD9PT09s=; b=U0IKTuwZBjNIG/g2HpBbO+SSdKdb2eC1VE4FMmeeJ0aEKsDsH+koHIawdvNnCC804Q gLL+4K4eKEr8gfHDPN5gAMingvNsJ91oWoTaDwdjghvU4ZAqjXJfU1sB3Lxi2u8hLikY gS9V2Yh4qJWA/sS9htibWZYRVRtuNU/7cDoqup/bAcs4yLQFjX71/4PueHmumpwWeRS1 rkbMo77YSiHWa8FT1R25dbfVfmg50oMu6m8xEV13LbPcC4bjKk30Ta8pktnr+QIrsC9Q y5CyMAMjVNTNTLG+LkBmuMh5oRLZKP6N4O7JRT0krH3YEbTEUspmwa4QFhCoVKqyKpzf 4o8A== X-Gm-Message-State: ACgBeo32b7j9KDyPaLNZxkGsdaR0nExeTJ/xkF5s3tXVPm3gRrxV+N8h fIeZ+0hf1hpDIsPM3X4uQIPYzaqgmyDxd1QAQdkVrQ== X-Google-Smtp-Source: AA6agR4Qz7DWzZDs5seZGK9BgtVSwbDTbQTPI0Pwf0C2IdnIvoCMgLaBaXgoefaZwv9TBZJrD1hwo5UIDrhfS3glmh8= X-Received: by 2002:a05:6808:195:b0:342:ed58:52b5 with SMTP id w21-20020a056808019500b00342ed5852b5mr3983142oic.22.1661615215537; Sat, 27 Aug 2022 08:46:55 -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:240946 Archived-At: --000000000000ad917d05e73af065 Content-Type: multipart/alternative; boundary="000000000000ad917a05e73af063" --000000000000ad917a05e73af063 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Here's a very interesting patch which fixes the flickering issue for me. Maybe we do something inaccurate during the cost calculation? Or we use some metric which is note representable on macos? On Sat, Aug 27, 2022 at 8:03 AM Dmitrii Kuragin wrote: > hm... I tried it in Terminal.app as well and it flickers less, likely > because it uses 256 colors, whereas in alacritty or iTerm2, I use 24 bit > colors. > > I tried to record a video of the behavior: > https://drive.google.com/file/d/1nMf_3MxRk2cTdgF3tFmzAZoxcy3vQghc/view?us= p=3Dsharing > > On Fri, Aug 26, 2022 at 10:41 PM Gerd M=C3=B6llmann > wrote: > >> Gerd M=C3=B6llmann writes: >> >> > I tried your recipe here with emacs -Q (Emacs 28.1 from Homebrew) in a >> > maximaized Terminal.app window, with a font as tiny as I could get (wi= th >> > Command +/-). I could not reproduce the flickering. >> > >> > Does this happen for you with emacs -Q in Terminal? >> >> BTW. this was >> >> GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.3.0) of 2022-04-30 >> >> and I'm running macOS 12.5.1. >> >> Maybe someone else having access to maxOS 11 can reproduce this? >> > > > -- > *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. --000000000000ad917a05e73af063 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here's a very interesting patch which fixes the fli= ckering issue for me.

Maybe we do something inaccurat= e during the cost calculation? Or we use some metric which is note represen= table on macos?

On Sat, Aug 27, 2022 at 8:03 AM Dmitrii Kuragin <kuragin@google.com> wrote:
h= m... I tried it in Terminal.app as well and it flickers less, likely becaus= e it uses 256 colors, whereas in alacritty or iTerm2, I use 24 bit colors.<= /div>


On Fri, Aug 26, 2022= at 10:41 PM Gerd M=C3=B6llmann <gerd.moellmann@gmail.com> wrote:
Gerd M=C3=B6llmann <gerd.moellmann@gma= il.com> writes:

> I tried your recipe here with emacs -Q (Emacs 28.1 from Homebrew) in a=
> maximaized Terminal.app window, with a font as tiny as I could get (wi= th
> Command +/-).=C2=A0 I could not reproduce the flickering.
>
> Does this happen for you with emacs -Q in Terminal?

BTW. this was

GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.3.0) of 2022-04-30

and I'm running macOS 12.5.1.

Maybe someone else having access to maxOS 11 can reproduce this?


--
*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.

--000000000000ad917a05e73af063-- --000000000000ad917d05e73af065 Content-Type: application/octet-stream; name="fix_flickering_on_macos.patch" Content-Disposition: attachment; filename="fix_flickering_on_macos.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l7c2rfh50 ZGlmZiAtLWdpdCBhL3NyYy9zY3JvbGwuYyBiL3NyYy9zY3JvbGwuYwppbmRleCBjNjQzNzMwOTY1 Li5mYWMyOWU2N2U4IDEwMDY0NAotLS0gYS9zcmMvc2Nyb2xsLmMKKysrIGIvc3JjL3Njcm9sbC5j CkBAIC02ODcsMzAgKzY4NywzMCBAQCBkb19kaXJlY3Rfc2Nyb2xsaW5nIChzdHJ1Y3QgZnJhbWUg KmZyYW1lLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpjdXJyZW50X21hdHJpeCwKICAgICB7CiAgICAg ICBwID0gY29zdF9tYXRyaXggKyBpICogKHdpbmRvd19zaXplICsgMSkgKyBqOwogCi0gICAgICBp ZiAocC0+aW5zZXJ0Y29zdCA8IHAtPndyaXRlY29zdAotCSAgJiYgcC0+aW5zZXJ0Y29zdCA8IHAt PmRlbGV0ZWNvc3QKLQkgICYmICh3cml0ZV9mb2xsb3dzX3AgfHwgaSA8IGopKQotCXsKLQkgIC8q IEluc2VydCBpcyBjaGVhcGVyIHRoYW4gZGVsZXRpbmcgb3Igd3JpdGluZyBsaW5lcy4gIExlYXZl Ci0JICAgICBhIGhvbGUgaW4gdGhlIHJlc3VsdCBkaXNwbGF5IHRoYXQgd2lsbCBiZSBmaWxsZWQg d2l0aAotCSAgICAgZW1wdHkgbGluZXMgd2hlbiB0aGUgcXVldWUgaXMgZW1wdGllZC4gICovCi0J ICBxdWV1ZS0+Y291bnQgPSAwOwotCSAgcXVldWUtPndpbmRvdyA9IGk7Ci0JICBxdWV1ZS0+cG9z ID0gaSAtIHAtPmluc2VydGNvdW50OwotCSAgKytxdWV1ZTsKLQotCSAgaSAtPSBwLT5pbnNlcnRj b3VudDsKLQkgIHdyaXRlX2Z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Y291bnQ7ICovCisgICAg ICAvKiAJICB3cml0ZV9mb2xsb3dzX3AgPSAwOyAqLworICAgICAgLyogCX0gKi8KKyAgICAgIC8q IGVsc2UgaWYgKHAtPmRlbGV0ZWNvc3QgPCBwLT53cml0ZWNvc3QgKi8KKyAgICAgIC8qIAkgICAg ICAgJiYgKHdyaXRlX2ZvbGxvd3NfcCB8fCBpID4gaikpICovCisgICAgICAvKiAJeyAqLworICAg ICAgLyogCSAgL1wqIERlbGV0aW5nIGxpbmVzIGlzIGNoZWFwZXIuICBCeSBkZWNyZW1lbnRpbmcg Siwgb21pdCAqLworICAgICAgLyogCSAgICAgZGVsZXRlY291bnQgbGluZXMgZnJvbSB0aGUgb3Jp Z2luYWwuICAqXC8gKi8KKyAgICAgIC8qIAkgIHdyaXRlX2ZvbGxvd3NfcCA9IDA7ICovCisgICAg ICAvKiAJICBqIC09IHAtPmRlbGV0ZWNvdW50OyAqLworICAgICAgLyogCX0gKi8KKyAgICAgIC8q IGVsc2UgKi8KIAl7CiAJICAvKiBPbmUgb3IgbW9yZSBsaW5lcyBzaG91bGQgYmUgd3JpdHRlbi4g IEluIHRoZSBkaXJlY3QKIAkgICAgIHNjcm9sbGluZyBtZXRob2Qgd2UgZG8gdGhpcyBieSBzY3Jv bGxpbmcgdGhlIGxpbmVzIHRvIHRoZQo= --000000000000ad917d05e73af065--