From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Introducing emacs-webkit and more thoughts on Emacs rendering (was Rethinking the design of xwidgets) Date: Fri, 04 Dec 2020 10:00:25 +0200 Message-ID: <834kl2f1ba.fsf@gnu.org> References: <864kmzupp0.fsf@akirakyle.com> <86pn46awrr.fsf@akirakyle.com> <87y2ise7j5.fsf@gnus.org> <86tutfwhr6.fsf@akirakyle.com> <87h7pfb76z.fsf@gnus.org> <86h7peqkt5.fsf@akirakyle.com> <83tutdsc8i.fsf@gnu.org> <86eeker01y.fsf@akirakyle.com> <83wny5naf5.fsf@gnu.org> <86o8jh9cij.fsf@akirakyle.com> <83czzwkmwk.fsf@gnu.org> <86lfeja49y.fsf@akirakyle.com> <87czzu7y5r.fsf@logand.com> <86zh2vvi55.fsf@akirakyle.com> <87ft4ncnl7.fsf@logand.com> <83k0tygby3.fsf@gnu.org> <87zh2uwq03.fsf@logand.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akira@akirakyle.com, emacs-devel@gnu.org To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 04 09:03:07 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kl63W-0003rE-S5 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 09:03:06 +0100 Original-Received: from localhost ([::1]:38722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl63V-0002zR-TQ for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 03:03:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kl61H-0001zS-8P for emacs-devel@gnu.org; Fri, 04 Dec 2020 03:00:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33325) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl61F-0002tm-Nm; Fri, 04 Dec 2020 03:00:45 -0500 Original-Received: from [176.228.60.248] (port=4180 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kl61E-0006DD-2F; Fri, 04 Dec 2020 03:00:44 -0500 In-Reply-To: <87zh2uwq03.fsf@logand.com> (message from Tomas Hlavaty on Thu, 03 Dec 2020 22:15:08 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:260273 Archived-At: > From: Tomas Hlavaty > Cc: akira@akirakyle.com, emacs-devel@gnu.org > Date: Thu, 03 Dec 2020 22:15:08 +0100 > > > Even turning the cursor off doesn't guarantee that Emacs will not > > trigger overwriting of the images. For example, sometimes Emacs moves > > the cursor by writing newline characters, which could potentially > > overwrite the image if the console implements that by writing spaces > > or clearing each line to EOL. > > But that example is a single event and does not cause glitch or > flickering. Why do you assume it's a single event? Whenever Emacs decides that moving the cursor from some coordinates to other coordinates should be done by writing newlines, it will always do that when it needs to. That could be every redisplay cycle, depending on the situation. > Emacs usually does not move the cursor by writing newline characters > because it feels like it. And it does not do that frequently. If you build your software on these assumptions, I can assure you it will break in some use cases. > If I do not do anything, Emacs will not do anything That is profoundly incorrect. First, "I do not do anything" doesn't mean Emacs doesn't: there are timers running in Emacs all the time, even if it's "emacs -Q". More importantly, what looks to you like "Emacs doesn't do anything" is the result of redisplay cycles that do quite a lot of processing, before they decide that nothing should be redrawn on the glass, and if you assume that processing will never include moving a cursor, you are building your code on shaky grounds.