From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update) Date: Fri, 14 Jul 2023 10:31:23 -0400 Message-ID: References: <877cr4nez9.fsf@localhost> <83lefj4okb.fsf@gnu.org> <83fs5r3tqv.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9281"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: yantar92@posteo.net, 64596@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 14 16:32:24 2023 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 1qKJqK-0002Ar-21 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jul 2023 16:32:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKJpz-0007em-PZ; Fri, 14 Jul 2023 10:32:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKJpy-0007ea-HP for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:32:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKJpy-0006b5-8P for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKJpy-0003Gx-3d for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2023 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64596 X-GNU-PR-Package: emacs Original-Received: via spool by 64596-submit@debbugs.gnu.org id=B64596.168934509312542 (code B ref 64596); Fri, 14 Jul 2023 14:32:02 +0000 Original-Received: (at 64596) by debbugs.gnu.org; 14 Jul 2023 14:31:33 +0000 Original-Received: from localhost ([127.0.0.1]:43175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKJpU-0003GD-Ra for submit@debbugs.gnu.org; Fri, 14 Jul 2023 10:31:33 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKJpS-0003G0-Ah for 64596@debbugs.gnu.org; Fri, 14 Jul 2023 10:31:31 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 184491000C4; Fri, 14 Jul 2023 10:31:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DD1B2100098; Fri, 14 Jul 2023 10:31:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689345083; bh=4y3KhmiSlbKzzDuAqX5qdAmyV4NDGbWJS1N7/uVAK3E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=W1rMauvJNTsqAYODLOS3kMgkMjSW6AWWbUxjbXZImc2v3uiFuwpvIlsPcOL4ZnYuj BmjnVyYPVg2GgQmP+aZUjS/eI58b61N2b2WgIXWwZ7rWQUWn5VO54d76U1QRl0LHlp ewb88cakIrvTBI7FsmrNaChYIc/kHowdh/ZDl6DKb2gPPSLDoX5B90jh5imrt5DuyT ezTIW9pMk6hgF3J1hQia0rRdoyhNLRgN5XiV8RYJyw8i8QcxHIK35EIxuTkomrrhnq 3l5gVQ05a7N8n+DICkc95CEHHMYiI9/BCcr7IBpFmx9rCdr78xdE8LwmPTQk4yXTuF LKyjr/YHMyEsQ== Original-Received: from pastel (unknown [104.247.239.133]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B5CA3120264; Fri, 14 Jul 2023 10:31:23 -0400 (EDT) In-Reply-To: <83fs5r3tqv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 Jul 2023 09:14:00 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265099 Archived-At: >> > Then I guess you or Ihor (or both) should try removing that line and >> > run with that for a while. >> FWIW, I've been running without those two lines ever since I put this FIXME. > I'd be happier with the alternative I proposed, which you cite below. I assume you assumed that my lack of problems would make me think removing those two lines is safe :-) I'm fully aware that when it comes to redisplay, one or two testers are definitely far from sufficient, don't worry. >> > Alternatively, maybe in the case of ALL non-nil the code should set >> > the prevent_redisplay_optimizations_p flag of all the buffers that are >> > displayed in some window, since some redisplay optimizations are not >> > eligible when the mode-line is about to be updated. >> >> Any reason why the corresponding optimizations don't consult the >> `update_mode_lines` var (or the `update_mode_line` buffer flag), or >> maybe have redisplay start by propagating the `update_mode_line` buffer >> flag to `prevent_redisplay_optimizations_p`? > > Once again, prevent_redisplay_optimizations_p is NOT (just) about > updating mode lines, it affects more optimizations. There's also I know. I didn't mean "consult `update_mode_lines` instead of `prevent_redisplay_optimizations_p`" but "consult `update_mode_lines` in addition to `prevent_redisplay_optimizations_p`". > It would be nice to analyze all those flags, make them more selective, > and understand/document better what optimizations and optional > processing are affected by each one of them. It is a large and > somewhat ungrateful job, so if someone wants to do it by > systematically examining the situations where we set each one of those > flags and their effects on redisplay, I can offer my best help (though > I cannot afford doing this job myself). I can't see it happening ever in such a systematic way. A more pragmatic approach is the one you propose afterwards: based on our vague understanding of how things work, make a few simplifications, expose them to our users and then see what bug reports we get in return. I suspect a single boolean variable (which we could call `internal--use-old-slow-redisplay`) to control those simplifications would be enough. We could set it to nil on `master` and to t in the release branch. Stefan