From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics 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 10:26:04 +0200 Message-ID: <682666d3-51f3-9097-1eff-c2c6c6bc5ac4@gmx.at> 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> <83r0p9b3om.fsf@gnu.org> <83jzv1b152.fsf@gnu.org> <83a5vxas9k.fsf@gnu.org> <877cr1nep6.fsf@localhost> <835y6kbgik.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 64596@debbugs.gnu.org To: Eli Zaretskii , Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 16 10:27:27 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 1qKx6F-0006fg-5r for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jul 2023 10:27:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKx5r-0006KU-PE; Sun, 16 Jul 2023 04:27: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 1qKx5q-0006KM-OW for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 04:27: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 1qKx5q-0003tB-H9 for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 04:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKx5q-0000Ax-5V for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 04:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jul 2023 08:27: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.1689495981622 (code B ref 64596); Sun, 16 Jul 2023 08:27:02 +0000 Original-Received: (at 64596) by debbugs.gnu.org; 16 Jul 2023 08:26:21 +0000 Original-Received: from localhost ([127.0.0.1]:46738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKx5B-00009x-0e for submit@debbugs.gnu.org; Sun, 16 Jul 2023 04:26:21 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:46401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKx58-00009j-KU for 64596@debbugs.gnu.org; Sun, 16 Jul 2023 04:26:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1689495967; x=1690100767; i=rudalics@gmx.at; bh=NG4Q5wQ1Y4st5ouzhYjUFCrCZ8m4KoIn6xuGAUZVJT0=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=PQcp3XLGmfoG0W43i0ISTCuhbGiufbNq31oHiQZIQs95owwJPQ8yVqPa0I/W6fdg+nuOYzZ x/awZkHZ4Yy7W14gU2cStRjw4az6CeDGo13dQMjD4exc4QdG9ELqVPUnII6tCMVbR2LB+Q0sU OTEZ1BWdnrdYSJua4kWPFSRb34Etqdz+1SjRXB0Cjet9XM0FYAmx+Pq6aNGnfgmCd7tVF6wRk GQceghkax8sGNGs6mh1B7/AMgI/cl18wnuujbwG/EsDS0VXFwugRIlWiD7RDZi88DqJrzdUY0 LUpbh8r6EXywEDhsmrgGzt13cKWYw3tLeNSG+OF/0fgXbEnH5i7w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([212.95.8.133]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N8ofE-1pqckz2102-015oEI; Sun, 16 Jul 2023 10:26:07 +0200 Content-Language: en-US In-Reply-To: <835y6kbgik.fsf@gnu.org> X-Provags-ID: V03:K1:HlAGhleFpWj/XO1oMlEI8Pbq23BTMhyShjGAThPDSYVXZze7M7T JKgeBFYO98a8MfqWd3ZwKS/3JQ2yuBcvlbvncqEkSAEpabAurVy4+A0N3CEuqSePoBt0iRn fqcFi70DjYpVli7MCZ/XrQSd8KzqZ9uSViOlDFxDjxcZ/eWdrZ2J4c7kV6Vy3jSUXkNEHJJ i+zmvt48yed1lbjraKTvQ== UI-OutboundReport: notjunk:1;M01:P0:lMYrvFqY/4w=;y8SlwzX4YU87UphBBK3zaY83CXN LJJ+tMWe1oq6Eakeg+SbFLt1kMm6WqC1tS32TggQZ9lliDOBHn4bMYqVhuVPlpSPAYGrWwjRw iVgxuO49B7qVI4xwWDrrrfATA5n34oGBaA/H9eQVGrbLDVp+P6kTH6/61Z2XWm+jQtjAECy0C 1abZ9rKFzuSc/cypW8sNqinzyVa881ofuANAgEbyhud0b+JLiiBOEtPxXVjvS8PDD5j6S7u2k /Qkyppu/ruvwxSP3ypSX3w6rrFW0Hhh/b3LsqKY3zdv9RnlRDPhjAp7GOGFOZlBuCevRuCo2w pUfXusz2tkKg4nmvFXrmrc9rha9SUBAhz/WntYf9x9TwaosQeqT9ap731pB3mw4xUBc8XYwij Etnix+tKnhcgE6YTGeks5Xn+SAobyzUdCDAANmAy1mkzIskMlNuB9lu1t84wy9Opah5/SU//b GlUmMfqDDjB4qltnesYLLHghBoSbBmdAM+xni3Xwq4avBxMTHwnpxj9yTecTEcz3IU55pnTCU DYEcGgTmbmygPNemqgEJzymb+OrlbT0F3Z6Yz1isRHV5lCcS9I3iLhKs2lATS8k/UADXTUTTj d+MvKOBba/7zTtS/HDs7IQ1ZQou5NyEdpHXnmjBYL3U6VgEhGH0Wk1TqkFkIfVkFSwGzUGw5S flM5yWC7fAKVslMuh8zMMh/kaSo4/agM3kYUrt6a0R4xIQHG8ZmuzK9Q8woDVPXR8DjUTl91z RyTCh/yhlVGHQ6rFrCgcD69soF2D9tUFuF2W7EbyIo+u3khJLjqUZflfhLn1Ia4fO117schu 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:265293 Archived-At: > These global variables come from the time when the Emacs redisplay was > much less selective. It basically has only two modes: either > redisplay only the selected window, or redisplay all the windows on > all the frames. (Here "redisplay" means "examine for redisplay and > decide whether and which parts need that", not necessarily "actually > redraw".) When the various 'redisplay' flags were added, the intent > was to make redisplay more selective, so that it could completely > refrain from examining windows on a certain frame, for example. The > right way to keep advancing in that direction is to extend these flags > and maybe introduce more flags that will describe the need to > redisplay in more detail. Global variables such as update_mode_lines > can do that only if they provide specific values to describe each > required aspect of redisplay. But in any case, the code which sets > the variable cannot make decisions for redisplay, it can only describe > the changes for redisplay to consider. From the POV of window management the situation is simple: When the size of a window or a decoration changes, it would like to tell redisplay about it. But redisplay would have to tell it first which kind of changes it's able to accept. For example, I don't even know whether, when running without window matrices, redisplay is capable of doing something reasonable with the fact that the border between two adjacent windows shifted and a third window not affected by that shift can be spared by redisplay. So from the POV of window management, redisplay would have to offer a list of such flags it is able to handle and do something reasonable about. As an example: one of the worst things the window code does is saving a window configuration, reading something from the minibuffer and restoring the window configuration when done. In nine out of ten cases the restored configuration will not have changed and redisplay wouldn't have to do anything. Now Fset_window_configuration is awful in the regard that it deletes all windows on the frame regardless of whether the configuration changed only to "restore" them later (including that n_leaf_windows allocation hack to find out which glyph matrices can be safely freed). While it is fairly easy to fix that, it's by no means clear what and how to tell redisplay that some window did change in one of those rare cases where it did. Try the following simple scenario which currently breaks redisplay: (let (config) (set-frame-parameter nil 'left-fringe 50) (y-or-n-p "?") (setq config (current-window-configuration)) (setq left-fringe-width 0) (set-window-buffer nil (window-buffer)) (y-or-n-p "?") (set-window-configuration config)) Here 'set-window-configuration' should be able to tell redisplay that it should redisplay the window but it should be able to tell that iff the fringe really changed which is fairly easy to find out. Once it found out, which kind of flag would it set? martin