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.bugs Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update) Date: Sun, 16 Jul 2023 17:45:18 +0300 Message-ID: <83pm4r9apt.fsf@gnu.org> References: <877cr4nez9.fsf@localhost> <83lefj4okb.fsf@gnu.org> <83fs5r3tqv.fsf@gnu.org> <834jm6fppc.fsf@gnu.org> <87a5vyidy6.fsf@localhost> <83sf9qe2ip.fsf@gnu.org> <83a5vxejz6.fsf@gnu.org> <87ttu4gnpt.fsf@localhost> <83351o9m6h.fsf@gnu.org> <87ilakgmjo.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6022"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, 64596@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 16 16:46:16 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 1qL30o-0001NI-8G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jul 2023 16:46:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qL30e-0004pt-0W; Sun, 16 Jul 2023 10:46:04 -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 1qL30c-0004pi-Aj for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 10:46: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 1qL30c-00035E-2Y for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 10:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qL30b-0006C9-VW for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 10:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jul 2023 14:46:01 +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.168951870823701 (code B ref 64596); Sun, 16 Jul 2023 14:46:01 +0000 Original-Received: (at 64596) by debbugs.gnu.org; 16 Jul 2023 14:45:08 +0000 Original-Received: from localhost ([127.0.0.1]:48388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL2zj-0006AC-C4 for submit@debbugs.gnu.org; Sun, 16 Jul 2023 10:45:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL2zd-000697-H4 for 64596@debbugs.gnu.org; Sun, 16 Jul 2023 10:45:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qL2zX-000246-Nd; Sun, 16 Jul 2023 10:44:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pd4R7tzzZSS21bj49fhQEZKAPOowKqkM3xEFVdU+QvA=; b=lR07At887/+T 0Z+wNfeq5Rs7I8sGKTHyKKZcfTVJJ6BHNeqrwFMlzuKlCqS2IP2Q/2D9za4Lu9f2bPUP8ndQOAKv1 9zZLv4JYc13jZ5aRqyJdmbtl5QBRA4QsEssySPPVBmfBqDEmoFJCsd/Sc6/kzQE7YYDq2z2SdNhkf asf9Up2FXh1kJ7yUkUj6MSC5bzkVrXSL+X/7zpMKvUBAeizxx3jhH3iVzRVEmlG5abBUogi/tICal otUzeHgaSRvHn49VrXaczLCECIWuZnH4dTboR/X/yYLG4pn3hrSBWaCMpysXDb8zD2Bf2TUx0e+1p TiCtUl2iMVJ5JC29VLtlwg==; Original-Received: from [87.69.77.57] (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 1qL2zX-0005GB-8P; Sun, 16 Jul 2023 10:44:55 -0400 In-Reply-To: (message from Stefan Monnier on Sun, 16 Jul 2023 10:26:10 -0400) 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:265345 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 64596@debbugs.gnu.org > Date: Sun, 16 Jul 2023 10:26:10 -0400 > > My understanding of the redisplay code is that it's split into 3 part: > > 1- decide which windows may need to be updated. More accurately: 1a - decide whether all the windows need to be considered, or just the selected window 1b - if all the windows need to be considered, decide for each frame whether it needs to be considered, and if so, consider all of that frame's windows Considering a window can sometimes decide very quickly that the window doesn't need to be redisplayed, but, as I mentioned elsewhere, when its frame's redisplay flag is set, we never decide that, and the frame's redisplay flag is what causes us to consider a frame in the first place. > 2- update the glyph matrix of a window. This update can be partial -- that's one of the redisplay optimizations. That is, we update only a very small part of the glyph matrix, as small as a single glyph row (= screen line). > 3- update the glass by comparing the old glyph matrix and the new one. > > [ The point between 1 and 2 is made visible to ELisp via > `pre-redisplay-function`. ] > > The `redisplay` bits belong to step (1). > The `prevent_display_optimizations_p` OTOH belong to step 2, AFAIU. Yes. > BTW, I wish those 3 steps were exposed to ELisp, so the top-level of > redisplay could be moved to ELisp. This would allow for example > `follow-mode` to pick a more appropriate order in which to process the > windows at step 2. follow-mode needs much more than that. But if you want to be able to tell redisplay "update only this window and nothing else", I think it should be easy to accomplish by adding a single function and no other changes: all you need is to call 'redisplay' (which is already exposed) after setting the redisplay flag of a single window. > > Then, why not use uniform naming scheme and have the buffer/window/frame > > flags names as maybe_redisplay and must_redisplay instead of different > > flag name for different object type? > > For that someone first needs to have a clear idea of what these things > do and how they relate to each other :-) Right.