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: [PATCH] Re: cc-mode fontification feels random Date: Mon, 30 Aug 2021 22:37:07 +0300 Message-ID: <831r6ak9lo.fsf@gnu.org> References: <835yvmka50.fsf@gnu.org> <9377d9ec-a3e5-ceea-8a9a-523a420f13f7@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6667"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 30 21:38:27 2021 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 1mKn6w-0001Xl-6U for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 21:38:26 +0200 Original-Received: from localhost ([::1]:55224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKn6v-0002nd-2V for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 15:38:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKn5p-0001D5-59 for emacs-devel@gnu.org; Mon, 30 Aug 2021 15:37:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59064) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKn5o-0002xM-MI; Mon, 30 Aug 2021 15:37:16 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4529 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKn5o-0007we-EW; Mon, 30 Aug 2021 15:37:16 -0400 In-Reply-To: <9377d9ec-a3e5-ceea-8a9a-523a420f13f7@dancol.org> (message from Daniel Colascione on Mon, 30 Aug 2021 12:28:01 -0700) 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:273544 Archived-At: > Cc: emacs-devel@gnu.org > From: Daniel Colascione > Date: Mon, 30 Aug 2021 12:28:01 -0700 > > > So you are saying that this will cause the display of the visible > > portion of the window to flicker whenever jit-lock-stealth finds such > > a "new type"? That could annoy, can't it? jit-lock-stealth is for > > fontifying portions of the buffer(s) that are not on display, it would > > be wrong for it to apply this enhancement, I think, certainly by > > default. > > Any literal "flicker" issues should have been fixed for a long time now. > What do you mean? That the fontification might change? That happens anyway. It doesn't happen with jit-stealth-lock now, because it only handles portions of the buffer that are not displayed. The portions that are displayed get fontified before they are shown in the window. > > And jit-lock-stealth-time of 1 sec is too short. I use 16, because > > once jit-lock-stealth starts fontifying a chunk, Emacs can be > > relatively slow to react to keyboard input, so I prefer to let > > jit-lock-stealth start its thing only when there's a very good chance > > I indeed stopped typing, not just thinking about something for a > > second or two. > > Isn't this problem what while-no-input is intended to prevent? while-no-input doesn't cause an immediate interruption of a running Lisp code, as you well know. > > Users can already arrange for that by manipulating the > > jit-stealth-lock parameters. Why should we change code to force upon > > everyone what seems like a good idea to you (but isn't a good idea > > IME, see above)? If you want that, you can easily arrange for Emacs > > to behave like that without changing any code. > > Because good defaults matter, and if we have proper input preemption of > stealth JIT working, there should be no downside. I invite you to try. I use jit-stealth-lock all the time, and that is my experience. With it running, Emacs sometimes is slow to respond to keyboard input. "Slow" relatively, of course: it takes less than a second even in the slow cases, but that's already somewhat annoying. Which is why I avoid letting it run when I'm still typing, albeit slowly.